Access Keys:
Skip to content (Access Key - 0)

Agilent Technologies

  

Working with Data Files

Data files are ASCII text representations of circuit responses based on various settings of independent variables. For instance the S-parameter response of an amplifier can be captured against frequency and power variations in a .p2d data file. Some ADS components, such as the AmplifierP2D_Setup and AmplifierS2D_Setup help create data files. Other sources for data files are measurement instruments or other simulation tools which output circuit responses in text form. Thus data files enable you to take data from sources outside of Advanced Design System or RF Design Environment and apply it to projects within these design environments.

The common purpose of all the various applications which require the use of data files, is to generate the behavior of a specific component or a circuit based on simulated or measured data points. Thus, data files allow the transfer of realistic parameter values to simple components and also enable the modeling of components with complex behavior such as black box and gray box models. Some examples of the use of data files are:

  • Using S-parameters to define the behavior of a linear black-box component representing an attenuator, a filter, or a small-signal transistor. The S-parameters, which are saved in a file, are used in conjunction with a component like the S2P. This permits the creation of a realistic and customized 2-port network during an ADS simulation.
  • Storing sets of transistor model parameters in separate files, and accessing them automatically through the course of a simulation to define the behavior of the transistor.
  • Defining the behavior of a complex nonlinear amplifier by using the gray-box AmplifierS2D component and data saved in an S2D file. The small and large signal S-parameters as well as noise parameters contained within the file can be used to define the behavior of the amplifier during a simulation.

Besides data-file driven components, there are other user-defined models such as using SDDs, FDDs, equation-based components, or the Model Builder which are discussed elsewhere. This section focuses on how to use the various types of data files to define the behavior of components and circuits in addition to providing a comprehensive understanding of the classification and formats associated with the various types of data files used by various components.

A data file is simply data in an ASCII text file, but there are several formats to choose from depending on the application. When determining the type of data file to choose please note:

  • The format you choose may depend on the type of data you have and where you want to use the data. The table below lists supported file formats and examples of where they are used.
  • The DataAccessComponent may be used to access the data from any data file regardless of format and to use it with any component that accepts file-based parameters. In this case, you need to make sure there is a logical relationship between the data and how you intend to use it. For more information, see Using Data Files, Datasets, and Data Access Components.

Supported Data Formats

The following table lists the supported data formats with a brief description and a reference to detailed information:

Available File Format Types
Format Description Usage Details
Touchstone Format
SnP †,†† (.snp) Small signal S, H, Y, Z, or G-parameters. May also include optional noise data (2 port data only). Where n is the number of ports from 1 to 99. n-port S-parameter file (S n P) components in the Data Items Library. Touchstone SnP Format
Impulse (.imp) ADS Impulse (.imp) files store multi-port impulse responses of linear N-ports. These files are the time-domain analog of the frequency-domain Touchstone format. Data output from the ImpulseWriter (Impulse Response File Writer controller). ADS Impulse File Format
MDIF Formats
Discrete (.dscr) Discrete (indexed) tabular and possibly statistical density data. Components that accept file-based parameters, link via the DAC. Discrete Format
Model MDIF Nonlinear model parameters. EE_BJT2_Model, JFET_Model, etc. Model MDIF Files
PDF ‡‡‡ (.pdf) User defined, piece-wise linear probability density function data for arbitrary distributions that are not correlated. With expressions in the Statistics tab. PDF Format
S2PMDIF (.s2p) Multi-dimensional 2-port, S, Y, Z, H, G signal and optional 2-port noise parameter (Fmin, Gopt, Rn) data. With S2PMDIF, DAC, and components represented by black box statistical characterization. S2PMDIF Format
P2D †,†† (.p2d) Large-signal, power-dependent, 2-port S, H, Y, Z, or G -parameters. AmplifierP2D in the System - Amps & Mixers library. P2D Format
S2D †,†† (.s2d) 2-port S, H, Y, Z, or G-parameters with forward gain compression and optional noise and intermodulation data. Amplifier2 and AmpSingleCarrier in the System-Amps & Mixers library, AmplifierS2D in the System-Data Models library. S2D Format
IMT †† (.imt) Intermodulation product table of mixer intermodulation products between the LO and signal that relates the mixer IM output level to signal input level. MixerIMT in the System - Amps & Mixers library. MixerIMT Data in the System-Data Models library. IMT Format
SPW †† (.ascsig text ) (.sig binary ) Time-domain voltage data file in Cadence Alta Group SPW text and binary formats. TimeFile item in Timed Sources and OutFile item in the Sinks library. SPW Format
TIM †† (.tim) Time-domain data. TimeFile item in Timed Sources and OutFile item in Sinks library. TIM Format
SDF ††,††† (.sdf) Time-domain voltage data file in 89600 file format. TimeFile item in Timed Sources and OutFile item in Sinks library. See software documentation for the Agilent 89600.
GCOMP †† Gain compression data Amplifier and Mixer items in the System - Amps & Mixers library. Understanding GCOMP Data
Generic MDIF (.mdif) Generalized multi-dimensional tables unifying other MDIF formats. Use in place of any specific MDIF. AmplifierS2D, AmplifierP2D, or any other MDIF example listed above. Link via the DAC. Generic MDIF
CITIfile Format
CITIfile ††† A general data format supported by network analyzers. Capable of storing multiple packages of multi- dimensional data. n-port S-parameter file (S n P) components in the Data Items Library. CITIfile Data Format
Agilent IC-CAP Formats
DUT, MDL, SET ‡,‡‡ Device under test (DUT), model (MDL), and setup (SET) files from the Agilent IC-CAP program. These files can contain Measured, Simulated, and/or Transformed data. Once the data is read into a dataset, it can be used with any component (for example, a VtDataset source) that can read data from a dataset. See Agilent IC-CAP documentation.
When writing data from a dataset to a file, the variable names are limited to S,H,Y,Z or G, for example, S[1,1], S[1,2], G[1,1], G[1,2]. The variable name is used to determine the type of data.
†† The first set of data in the dataset that matches the data type (name) will be output. It is not possible to arbitrarily select which data will be output.
††† There are some specific problems with the current version in writing and/or reading this data format. On the Agilent EEsof web site, refer to the Release Notes in Product Documentation and to Technical Support for more information and workarounds (www.agilent.com/find/eesof).
The Data File Tool can only read IC-CAP data.
‡‡ Only simple, scaled expressions with numbers or variables and one operator (either +, -, *, or /) are supported for start, stop, step, and number of points parameters, for example, start= 1 GHZ or stop=icmax/10.
‡‡‡ This format is not yet fully supported.
The COD, FIR, LAS, and SPE formats were obsolete when ADS 1.0 was introduced and are not used by the application. The LIST2 and T2D formats are also obsolete.

For information about a particular component, refer to the documentation for Analog/RF or Signal Processing components, or click Help when editing component parameters.

Making a Data File

You can create a data file using these methods:

  • Manually type the data into a text file using any text editor, being sure to follow the formatting guidelines for the type of data file that you want.
  • Use the Data File Tool. The Data File Tool enables you to transfer data between datasets and files that are in the following file formats: Touchstone, Measurement data interchange format (MDIF), CITIfile, and IC-CAP. For learn about the Data File Tool, see Reading and Writing Data Files.
  • Perform a P2D controller-based simulation using AmplifierP2D_Setup or AmplifierS2D_Setup. The results of these simulations are saved to files in P2D and S2D formats respectively, which can then be used with the AmplifierP2D or AmplifierS2D. For more information on the P2D controller itself, see P2D Simulation.

Saving a Data File

When saving a data file, save it as an ASCII text file.

  • A data file does not require a particular extension, but you may want to use the extension recommended for each format for identification purposes. These extensions are given in the details describing each format. If you choose a different extension, you must provide this information to the component you intend to use through the File parameter of the component.

You can save the data file:

  • In the project where it is used under the <prj>/data directory. This is the default location if no path is provided to the component using the file.
  • Any location, if you provide the full file path to the component. You provide this information using the File parameter of the component.

For more information about the File parameter, place the component of interest on a schematic, double-click to edit it, and click the Help button at the bottom of the dialog box.

Using Data Files, Datasets, and Data Access Components

Both data files and datasets can contain data that you want to use with a component. You can use either one, depending on your situation:

  • You may want the S-parameters from a simulated design. In this case, use the dataset and a DAC to link the data to the component you want to use.
  • You may have S-parameter specifications from a component sheet. In this case, type them into a data file.

You also want to consider the method of linking your data with the component of interest:

  • You have a data file, such as an .s2d, and you want to use it with a component that can read such a file, such as the AmplifierS2D. No DAC is needed.
  • You have a dataset or data file, but the component you want to use doesn't read the data directly. Use a DataAccessComponent to link the data file and component. The component you choose must have the file-based option under the Parameter Entry Mode or the parameter AllParams. For example, the BJTM1 model has the parameter AllParams; the R component has the Parameter Entry Mode. For instructions on how to use a DAC, see DataAccessComponent (Data Access Component) or Schematic Capture and Layout.

Reading and Writing Data Files

Use the Data File Tool to import and export data between datasets and text files that are in the following file formats:

  • Touchstone
  • Measurement data interchange format (MDIF)
  • CITIfile
  • IC-CAP

You can transfer data from a file into a dataset, or vice versa. One application is to transfer data from a dataset to an MDIF file, for use with a specific type of component. For example, a file in P2D format (P2D is one of several MDIF formats) containing S-parameters can then be used by the P2D amplifier. Using the Data File Tool, you can write S-parameters from a dataset to a file in P2D format. Another application is reading Agilent IC-CAP data into a dataset to be used in conjunction with a component, such as a source, that can read data from a dataset.

See the table above in Supported Data Formats for a list of the available file types, a description of the file contents, and the component that uses the data. Be sure to review the notes at the end of the table. The details about each file format are described later in this topic.

Starting and Exiting the Data File Tool

You can start the Data File Tool from a Schematic window or a Data Display Window.

  • From a Schematic window, choose Tools > Data File Tool. Or, click the Data File Tool icon.
  • From a Data Display window, choose Tools > Data File Tool. Or, click the Data File Tool icon.

To exit the Data File Tool, choose File > Exit from the menu bar.

Parts of the Data File Tool

The following illustration shows the default appearance of the Data File Tool user interface for a UNIX-based system when the Data File Tool is started.

The layout of the interface and names of the various elements vary with the task being performed (read or write) and can also vary with the file format selected. Examples of this variation in the appearance of the Data File Tool user interface is shown in the two following figures.


Data File Tool in read mode



Data File Tool in write mode

These are the more frequently used elements of the interface:

  • The Menu bar displays the menus that are available in the Data File Tool window.
  • The Dataset field lists the datasets in the current project. The selected dataset or the name of a new dataset is displayed in the Dataset name field.

Reading a File

To read the contents of a file into a dataset:

  1. From an open Data File Tool window, click Read data file into dataset.
  2. Under File format to read, select one of the following file formats:
    • Touchstone
    • MDIF
    • Citifile
    • ICCAP
  3. For the MDIF format, choose the appropriate sub-format from MDIF sub type.
  4. Under Input file name, type in the file name if the file is in the project. If it is not, click Browse to locate and select the file.
  5. The data from the selected file will be written to a dataset. Enter a name in the Dataset name field or select from the existing datasets in the Datasets list. If you choose a dataset from the list, any data that is already stored in the dataset will not be saved and will be overwritten with new data.
  6. Click Read File to send the file contents to the dataset.
    Note

    The source file must not use any ADS reserved variables or non-ASCII characters. Use of such a file can produce misleading results.

Writing to a File


To write data to a file:

  1. From an open Data File Tool window, click Write data file from dataset.
  2. Under File format to write, select one of the following file formats:
    • Touchstone
    • MDIF
    • Citifile
  3. For the Touchstone and MDIF formats, choose the appropriate sub-format from Touchstone data type, or MDIF sub type.
  4. Under Output file name, type in the file name you want to write to. It will be saved in the project directory. If you want to save the file in a different location, click Browse to select a location.
  5. Under Complex data format, select the complex data format to be used in the file.
  6. For Touchstone and MDIF files, under Frequency units, select the frequency units to be used in the file.
  7. Under Data notation format, select the data notation format to be used in the file.
  8. Under Max resolution, select the maximum resolution to be used in the file.
  9. The source of the data can be any project dataset. It should contain data matching the file format selected. Select an existing dataset from the Datasets list. Click View Dataset to view the contents of the selected dataset.
  10. Click Write to File to send the data to the file.
    Note

    If a dataset has just been created by reading a file, it might be necessary to click Update Dataset List to see it appear in the list.

Examples

You can find designs that use different data files in the Examples directory under Data_comp_prj and DataAccess_prj.

Instructions for using a particular type of file with a component that is designed to read the file (like an . snp file and SnP component) can be found in the remaining reference sections.

Touchstone SnP Format

These files contain small-signal G-, H-, S-, Y-, or Z-network parameters described by frequency-dependent linear network parameters for 1- to 99-port components. The 2-port component files can also contain frequency-dependent noise parameters. This data file format is also known as Touchstone format.

An .snp file can be used with an SnP component to model the behavior of a linear model using S-parameters. The file contains the S-parameters, the component is placed within the schematic.

This section describes:

  • Choosing an .snp file for use with an SnP component
  • An overview of the SnP file
  • The basic SnP format
  • Adding noise to a 2-port Snp file
  • The basic SnP format applied to G-, H-, S-, Y-, and Z-parameters, plus examples of each

Linking an .snp File to an SnP Component

To link a file to the component:

  1. Add an SnP component to your schematic. It can be found in the Data Items library.
  2. Select the File parameter. Ensure that the Parameter Entry Mode is set to Network Parameter File Name .
  3. In the File Name field, enter the name of the file you want to use:
    • You can type the name directly in the field.
    • Click Data files list to locate a file in the current project (or any files located based on the setting of the DATAFILES variable in de_sim.cfg).
    • Click Browse to locate a file outside the current project.
    • Click Copy template to select an example file that you can customize.
  4. After you select a file, click Edit if you want to view the file or change its contents.

For instructions on how to set the remaining parameters, click Help in the open component dialog box.

Overview

SnP data files are ASCII text files in which data appears line by line, one line per data point, in increasing order of frequency. Each line of data consists of a frequency value and one or more pairs of values for the magnitude and phase of each S-parameter at that frequency. Values are separated by one or more spaces, tabs or commands. Comments are preceded by an exclamation mark (!). Comments can appear on separate lines, or after the data on any line or lines. Extra spaces are ignored. Recommendations for filenames are:

1-port: filename.s1p

2-port: filename.s2p

Up to 99 ports can be defined.

You can specify the following parameters in an .snp file:

S

=

Scattering parameters

Y

=

Admittance parameters

Z

=

Impedance parameters

H

=

Hybrid-h parameters

G

=

Hybrid-g parameters

Note

The mismatched port impedance is not supported by the ADS simulator. If a Touchstone file has the input/output mismatch information in the header, it is ignored by the DAC and the SnP components, and a default matching 50 ohm port impedance is used.

The following sections discuss the content and format of network parameter files as input for circuit analysis.

Basic SnP File Format

The following example shows the general format for component data files. It consists of:

  • An option line
  • Data lines
  • Comments

The Option Line

The option line, specifying the frequency units and the normalizing impedance, precedes the data lines.
# (freq_units parameter format R n)
<data line>
...
<data line>
where:

#

=

The delimiter that tells the program you are specifying these parameters

freq_units

=

Sets the units. Options are GHz, MHz, KHz, or Hz.

parameter

=

Sets the desired parameter. Options are S, Y, Z, G, or H.

format

=

The format desired. Options are MA, DB, or RI.

R n

=

The reference resistance in ohms, where n is a positive number of ohms; which is the real impedance to which the parameters are normalized.


In summary, the option line should read:

For .s1p files:

#

[HZ/KHZ/MHZ/GHZ]

[S/Y/Z]

[MA/DB/RI]

[R n]

For .s2p files:

#

[HZ/KHZ/MHZ/GHZ]

[S/Y/Z/G/H]

[MA/DB/RI]

[R n]

For .s3p/.s4p files:

#

[HZ/KHZ/MHZ/GHZ]

[S]

[MA/DB/RI]

[R n]

where square brackets [...] indicate optional information; .../.../.../ indicates that you select one of the choices; and, n is replaced by a positive number.

Default Option Line

The default option line for component data files is:
# GHZ S MA R 50

Option Line Examples

Frequency in GHz, S-parameters in real-imaginary format, normalized 100 ohms:
# GHz S RI R 100
Frequency in KHz, Y-parameters in real-imaginary format, normalized 100 ohms:
# KHz Y RI R 100
Frequency in Hz, Z-parameters in magnitude-degree format, normalized to 1 ohm:
# Hz Z MA R 1
Frequency in KHz, H-parameters in real-imaginary format normalized to 1 ohm:
# KHz H RI R 1
Frequency in Hz, G-parameters in magnitude-degree, format normalized to 1 ohm:
# Hz G MA R 1

Data Lines

Data lines contain the data of interest. A special format is used for 2-port data files where all of the network parameter data for a single frequency is listed on one line. The order of the network parameters is:

N11, N21, N12, N22

For 3-port or higher data files, the network parameters appear in the file in a matrix form, each row starting on a separate line. A maximum of four network parameters (with 2 real numbers for each) appear on any line. The remaining network parameters are continued on as many additional lines as are needed.

The following sections describe the data-line format for single and multi-port components.

Data-line Formats

When you type the data below the option line, the columns need not line up precisely like those shown. The syntax for entering data is as follows:

1-port Component
Magnitude-Angle format:

(Columns: f Mag Ang)
  f |S11|

2-port Component
Magnitude-Angle format:

f |S11|

Real-Imaginary format:

f Re{S11} Im{S11} Re{S21} Im{S21} Re{S12} Im{S12} Re{S22} Im{S22}
dB-Angle format:
f 20log10|x11|

where

x = S/Y/Z/H/G
f = Frequency

3-port Component
Magnitude-Angle format:

( Columns : f Mag Ang Mag Ang Mag Ang)
  f |S11| <S11 |S12| <S12 |S13| <S13
    |S21| <S21 |S22| <S22 |S23| <S23
    |S31| <S31 |S32| <S32 |S33| <S33

4-port Component
Magnitude-Angle format:

( Columns : f Mag Ang Mag Ang Mag Ang Mag Ang)
  f |S11| <S11 |S12| <S12 |S13| <S13 |S14| <S14
    |S21| <S21 |S22| <S22 |S23| <S23 |S24| <S24
    |S31| <S31 |S32| <S32 |S33| <S33 |S34| <S34
    |S41| <S41 |S42| <S42 |S43| <S43 |S44| <S44

where:

f = Frequency
Mag = Magnitude of S-parameter Sij
Ang = Angle of S-parameter Sij

Adding Comments to Data Files

You can document your data files by preceding a comment with the exclamation mark (!) on any line. A comment can be the only entry on a line or can follow the data on any line.

Adding Noise Parameters to an SnP File

Noise parameters can be included in SnP 2-port data files. Noise data can follow G-, H-, S-, Y-, or Z-parameters described for each frequency. The x values are data.

Each line of a noise parameter has the following five entries:

x1 x2 x3 x4 x5

where:

x1

=

Frequency in units. The first point of noise data must have a frequency less than the frequency of the last S-parameter frequency

x2

=

Minimum noise figure in dB

x3

=

Source reflection coefficient to realize minimum noise figure (MA)

x4

=

Phase in degrees of the reflection coefficient (MA)

x5

=

Normalized effective noise resistance. The system simulator requires this parameter to meet physical requirements. If the user-supplied x5 value is less than allowed for this requirement, then the system simulator will force this x5 value to the lowest physical limit.

Sopt noise data in an SnP file must be expressed in a Magnitude/Angle (MA) format. The simulator assumes that the Sopt noise data in an SnP file is specified in a MA format. This is the only supported format for Sopt data in an SnP file. The complex format type specified in the format line does not apply to the Sopt data specified in the Noise block.

The data file reader cannot determine if the numbers representing the Sopt data in the SnP data file are expressed in MA format and not in dB or Real/Imag formats. It reads in whatever numbers appear on the data line and processes them as if they are MA, without issuing an error or warning message. If the Sopt data in the SnP data file is expressed in a format other than MA, this can produce simulation data that look incorrect.

Note

The frequencies for noise parameters and network parameters need not match. The only requirement is that the lowest noise-parameter frequency be less than or equal to the highest network-parameter frequency. This allows the file processor to determine where network parameters end and noise parameters begin.

The source reflection coefficient and effective noise resistance are normalized to the same resistance as specified for the network parameters.

Example File Containing Noise Data

This is an example of a data file with noise data:

Applying the SnP Format, and Examples

In this section are formatting references and examples for:

  • G-parameter files
  • H-parameter files
  • S-parameter files
  • Y- and Z-parameter files

Guidelines

  • The optimum source reflection coefficient and the normalized effective noise resistance are assumed to be with respect to the normalizing resistance value (appearing after the R keyword) on the header line.
  • The frequencies for noise parameters and G-, H-, S-, Y-, or Z-parameters (network parameters) do not have to match. The only requirement is that the lowest noise parameter frequency be less than or equal to the highest network parameter frequency. This allows the file processor to determine where G-, H-, S-, Y-, or Z-parameters end and noise parameters begin. Please note that it is required
    to have at least two lines of network parameters, when using noise parameters. With only one line of network parameters and one line of noise parameters, the simulation will result in the below error.

ERROR: Unable to read required data from touchstone file. Please ensure that the file is ASCII and correctly formatted.

If you add a second line of network parameters, everything works fine.

G-Parameter Files


G-parameter files (Hybrid-g parameters) use MA or RI format. They are strictly 2-port files. G-parameter measurements are:

G11

input admittance (port 2 open)

G22

output impedance (port 1 shorted)

G21

forward voltage gain (port 2 open)

G12

reverse current gain (port 1 shorted)

G-Parameter MA and RI File Formats

G-Parameter File Example

H-Parameter Files


H-parameter files (Hybrid-h parameters) use MA or RI format. They are strictly 2-port files. H-parameter measurements are:

H11

input impedance (port 2 shorted)

H22

output admittance (port 1 open)

H21

forward current gain (port 2 shorted)

H12

reverse voltage gain (port 1 open)

H-Parameter File Example

S-Parameter Files

S-parameter files (scattering parameters) can have MA, RI, or DB format for files with 1 to 99 ports.

S-Parameter 1-Port MA, RI, and DB File Formats

S-Parameter 2-Port MA, RI, and DB File Formats

S-Parameter 3-Port MA, RI, and DB File Formats

S-Parameter 4-Port MA, RI, and DB File Formats

S-Parameter 1-Port File Example

S-Parameter 5- to 99-Port File Formats

These file formats appear in a matrix form similar to the 3- and 4-port files, except that only four S-parameters (with 2 real numbers for each) can appear on a given line. Therefore, the remaining S-parameters in that row of the S-matrix continue on the next line of the file.

Each row of the S-matrix must begin on a new line of the file. The first line of the first row of the S-matrix begins with the frequency value.

S-Parameter 10-Port File Example (at One Frequency)

Linear 1-Port (.s1p) File Example

Linear 2-Port (.s2p) File Example

Linear 3-Port (.s3p) File Example

Linear 4-Port (.s4p) File Example

Y- and Z-Parameter Files

Immittance parameters are specified in MA or RI format, where the # line has Y for admittance and Z for impedance. Both are normalized to the reference resistance.

Y- (Z-) Parameter 1-Port MA and RI File Formats

Y- (Z-) Parameter 2-Port MA and RI File Formats

Y- (Z-) Parameter 3-Port MA and RI File Formats

Y- (Z-) Parameter 4-Port MA and RI File Formats

Y- (Z-) Parameter 3-Port File Example

Y- (Z-) Parameter 5- to 99-Port File Formats

These file formats appear in a matrix form similar to 3- and 4-port files. Only four Y-, or Z-parameters (with 2 real numbers for each) can appear on a given line; therefore, the remaining parameters in that row of the matrix continue on the next line of the file. Each row of the Y-matrix must begin on a new line of the file. The first line of the first row of the Y-matrix begins with the frequency value. The actual Y- (Z-) parameter value is obtained by dividing (multiplying) the file entry with the reference resistance.

Y- (Z-) Parameter 10-Port File Example (at One Frequency)

ADS Impulse File Format

ADS Impulse ( .imp ) files store multi-port impulse responses of linear N-ports. For a frequency domain N-port description:

,

.imp files provide a method of storing the time domain equivalent of,

,

where hij(t) is the impulse response of matrix element Hij(ω).

ADS impulse files store discrete, uniformly sampled representations Impij(n) of impulse responses hij(t) normalized by the sampling step, and optionally allow for explicit storage of the impulse response delay, as illustrated in the following figure:

More specifically,

Impij(n)=hij(Td+nΔT)ΔT ,

where Td is the base delay and ΔT is the sample spacing.

.imp files are the time-domain analog of the frequency-domain Touchstone format. They consist of comments, header lines and data lines, similar to Touchstone. Header lines describe global settings while data lines describe impulse response matrices, as detailed below.

Comments

Comments are preceded by an exclamation mark (!). Comments may be placed at the beginning or at the end of a line.

Line Continuation

Carriage return is used as the line continuation character.

Header Lines

Header lines consist of the Option line and the following keywords:

  • [Version]
  • [Number of Ports]
  • [Reference]
  • [Original Frequency Range]
  • [Time Step]
  • [Base Delay]

With the exception of the Option line, all keywords are enclosed in the square brackets. Header lines, including keywords and the Option line, may appear in any order. Header lines precede data lines and may not appear after the data section.

The Option Line

The Option line specifies the network parameter type and the normalizing impedance. The Option line format is:

# parameter R n

where:

parameter

=

Network parameter type. Permitted values are: S, Y or Z

n

=

Optional S-parameter reference impedance, defaulting to 50Ω.

 

Option Line Examples

S-parameters impulse response, normalized to 100Ω:

# S R 100.0

Y-parameter impulse response:

# Y

Z-parameter impulse response:

# Z

[Version]

The [Version] keyword defines the version of the .imp file. The [Version] line is of the form:

[Version] version

The initial version is 1.0. [Version] is optional and defaults to 1.0.

[Version] Line Example

[Version] 1.0

[Number of Ports]

The [Number of Ports] keyword defines the number of network ports. The [Number of Ports] line is of the form

[Number of Ports] n

[Number of Ports] is mandatory.

[Number of Ports] Line Example

[Number of Ports] 2

[Reference]

The [Reference] keyword defines the port reference impedances for impulse data in S-parameter form. The [Reference] line is of the form:

[Reference] ref1 ref2 ... refN

where ref1, ref2 ... refN define the reference impedance for each port.

This keyword is optional. If [Reference] is not present, the reference impedances are defined by the Option line. If [Reference] is present, it must contain an entry for every port (for example, a four-port data file using [Reference] must contain four [Reference] impedance entries). If reference impedances are specified both using [Reference] and in the Option line, the [Reference] line takes precedence.

[Reference] Line Example

A two-port network with port 1 terminated into 75Ω and port 2 terminated into 75Ω:

[Reference] 75.0 75.0

[Original Frequency Range]

This keyword defines the frequency range of the frequency domain network parameters from which the .imp file was extracted. [Original Frequency Range] is optional. The line is of the form:

[Original Frequency Range] minFreq maxFreq units

where

minFreq

=

Lowest frequency

maxFreq

=

Highest frequency

units

=

Permitted units are: Hz, kHz, MHz, GHz, THz. Default units are GHz.

 

[Original Frequency Range] Line Example

[Original Frequency Range] 0.05 20.0 GHz

[Time Step]

The [Time Step] keyword defines the uniform sampling step for the impulse response. This line is of the form:

[Time Step] timeStep units

where

timeStep

=

Sampling step.

units

=

Permitted units are: fsec, psec, nsec, μsec, msec and sec. Default units are sec.

The [Time Step] line is mandatory.

[Time Step] Line Example

[Time Step] 1.0 nsec

[Base Delay]

The [Base Delay] keyword defines the base delay of each impulse response. [Base Delay] is of the form:

[Base Delay] baseDelay1 baseDelay2 ... baseDelayM units

where

baseDelay1, baseDelay2 ... baseDelayM

=

Base delays of each of the M impulse responses. For an N=port network, M=N2. Base delays are ordered row-wise.

Units

=

Permitted units are: fsec, psec, nsec, μsec, msec and sec. Default units are sec.

 

[Base Delay] Line Example

If the impulse response matrix has the following hypothetical base delays:

Base delay (1,1) = 1.0 nsec
Base delay (1,2) = 2.0 nsec
Base delay (2,1) = 3.0 nsec
Base delay (2,2) = 4.0 nsec,

it would be expressed by the [Base Delay] line as follows:

[Base Delay] 1.0 2.0 3.0 4.0 nsec

Data Lines

Data lines define the impulse response matrix. Data lines follow Header lines. Data lines are of the form:

[Number of Points] P11
sample1 sample2 ... sampleP11

[Number of Points] P12
sample1 sample2 ... sampleP12

...

[Number of Points] PNN
sample1 sample2 ... samplePNN

where

Pij

=

Number of sample points in the impulse response of parameter (i,j)

sample1 sample2 ... samplePij

=

Impulse response samples of parameter (i,j)

There are N2 data lines for an N-port network. Impulse responses are ordered row-wise.

Data Lines Example

Example .imp File

Discrete Format

The discrete data file consists of an array of data arranged in rows and columns. The values available for each parameter are arranged in columns. Following the BEGIN DSCRDATA line is the % format line which 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 heading Index in the example below, contains entries used to identify each row in the file. These entries can be either an integer or an alphanumeric identifier, and can be thought of as a list of specification numbers (or part numbers). For example, the data file data/stdvalues15.dscr is arranged as follows:

Selecting a Row

A row of data can be selected by specifying its row index (starting from 0). In this example, the file lists two columns of values labeled A12 and A13. By specifying 2 as the row number, the values 1000 and 2200 are selected for A12 and A13, respectively.

Using the File with a DAC

To use the data within the file, you must link the file to the component of interest. You reference a discrete data file in this way by using a DAC:

  1. Place a DataAccessComponent data item in your design. The DAC is located in the Data Items palette. Double-click the DAC to edit it.
  2. On the File tab, in the File Name field, specify the name of the discrete data file, and accept the default setting for File Type , which is Discrete .
  3. On the Interpolation tab, accept the defaults for Interpolation Method ( Index Lookup ) and for Interpolation Domain ( Rectangular ).
  4. On the Independent Variable tab, set the names and values for the independent variables. This is necessary since data in a discrete data file can be accessed only by using an index lookup value. This means looking up data by row number.
    To set up an independent variable, enter the name in the Variable Name field. For a discrete data file, the innermost independent variable is the dimension number which should be used as the name. Next, enter the row number in the Value field, which can be a variable assigned a value on the schematic. Then click Add to insert the name and value in the table at the left. Repeat this process for each independent variable in the data file.
    Values entered for Variable Name are treated as strings, and quotation marks are inserted with these values automatically when added to the table's Name column. However, the innermost independent variable of a discrete data file must be specified as a cardinal integer instead of a string name. Assuming you are working with a one-dimensional data file, enter @1 to enter the integer (@ suppresses the quotation marks). For example, here is a portion of a one-dimensional discrete data file:
    If you define a variable called MyIndex in a schematic whose value represents the index of the row of data to be accessed, the table of independent variables should be constructed this way to read the one-dimensional file:
    The value assigned to MyIndex in the schematic determines which row of data is read. So if MyIndex = 0 , the first row is read.
  5. Place the component whose parameter values should come from the data file. Double-click the component.
  6. Under Pa rameter Entry Mode, select File Based.
  7. Under Data Access Component Instance , enter the ID of the desired DAC data item.
  8. Under Dependent Parameter Name , enter the name of a dependent variable in the discrete data file (In the sample above, the dependent variable names are A12 and A13.).

Example

For an example of using a discrete data file, refer to amp1.dsn in the Examples directory, under Tutorials/DataAccess_prj .

Model MDIF Files

Nonlinear devices obtain their model parameters either from a model item or a file. For those devices that use a file, such as the EE_BJT2_Model , this section discusses the appropriate format for a model file, and how to read the file.

Model files are text files that contain model parameter names and values. A sample model file for the EE_BJT2_Model is shown below. Comments can be placed in the file by starting the line with REM . The model parameters are placed between BEGIN BDTA and END BDTA . One or more parameter names are placed on a line beginning with the percent symbol (%); corresponding values are placed in the same order on the next line. Parameter names can be in any order and are not case sensitive. Any parameters that are not present in the file take on their documented default values. Parameter names for each device are listed in the documentation for that device.

The following figure shows how to obtain parameter values from a model MDIF file using a DataAccessComponent. The DAC refers to the model file by name. In this example, the file name is bfqtm1.txt . Additionally, Type is set to MDIFmodel and ExtrapMode set to InterpolationMode . On the device model component, the AllParams parameter is set to the name of the DAC, which is DAC_BJT .


Reading a Model MDIF file using a DataAccessComponent

PDF Format

This format is for user-specified Probability Density Functions (PDF). PDF is used for arbitrary distributions that are not correlated. The two methods available accommodate:

  • Situations where the spread of statistical data is proportional to the nominal value (as in a percent tolerance).
  • Situations where the spread is independent of the nominal value (an absolute tolerance).

Probability density functions are represented as vertices of piecewise linear segments. These value/ordinate pairs are stored in a textual data file in a prescribed format. The nominal value is also stored.

User-specified probability density files have an extension .pdf and use an MDIF file format. Only a single distribution definition is allowed in each .pdf file.

Guidelines for .pdf

  • In addition to the nominal value, there must be a minimum of three value/ordinate data pairs.
  • For tolerance representation, all value data and the nominal value must have the same algebraic sign.
  • The ordinate data associated with the most negative and most positive value data must be zero.
  • All ordinate data must be non-negative.
  • At least one non-end ordinate data must be non-zero.

Example PDF File

The following example shows how to create a user-defined PDF file. The technique involves the use of a discrete file which contains the nominal value and the statistical data (in piece-wise linear form.) In this example, the first block contains the allowable nominal values, and the second block contains the statistical information. The VALUE/ORDINATE pairs describe the user-defined PDF.

Note

The total area under your PDF does not have to equal one as in the strict definition of a PDF-the simulator will automatically scale your PDF to meet this condition.

Interpretation of PDF data

Interpretation of user-supplied PDF data is piece-wise linear with respect to value/ordinate pairs. The data preparation previously described enables the program to supply a properly qualified variate.

To realize a statistical variable which obeys the user-supplied PDF, a uniform variate on the interval 0 to 1 is used as an input to a function which is the inverse of the cumulative distribution function (CDF). The CDF is formed by integrating the PDF from its most negative value to its most positive value, with the following conditions:

  • Fx (-∞), the CDF at minus infinity = 0
  • Fx (∞), the CDF at infinity = 1

Applying this uniform [0,1] variate to the inverse of the CDF results in a statistical variable having the user-specified probability density function.

PDFs may be used with:

  • Yield analysis, with or without post-production tuning
  • Yield optimization (design centering)

S2PMDIF Format

The S2PMDIF data format file (. s2p ) can contain multiple two-port small-signal measurement data and associated noise measurement data in a single file. S2P indicates that the data used is typically S-parameters, though other small-signal parameters (Y, Z, H, G) are supported. These files are a natural extension of two-port S-parameter Touchstone files. For information about Touchstone files, see Touchstone SnP Format. MDIF refers to the fact that these files use the format and syntax rules associated with the Measurement Data Interchange Format (MDIF).

The most typical application of the S2PMDIF format is the creation of a file-based statistical representation for one or more devices in the fabrication process. Due to process variations, S-parameters for the same device will vary naturally. Using the S2PMDIF format, which captures all S-parameter data, in conjunction with statistical and yield analysis tools, which can randomly select a part, statistical characterization of a device (known as a truthmodel ) for yield analysis is achieved.

General File Structure

The file structure can repeat for as many small-signal data/noise data pairs as needed. Noise data is optional and the file structure shown here may only have ACDATA blocks if desired.

! Comment Line
VAR <_Your_variable_name#1_> = <Your_Value>_
VAR <_Your_variable_name#2_> = <Your_Value>_
VAR <_Your_variable_name#n_> = <Your_Value>_
BEGIN ACDATA
! Option line
% F n11x n11y n21x n21y n12x n12y ! signal format line
! < Your small data consistent with above format line >
END
BEGIN NDATA
! Option line
% F nfmin n11x n11y rn ! noise format line
! < Your noise data >
END
! Repeat entire ACDATA and NDATA blocks above if necessary
! preceded by different VAR values to distinguish measurements.

Guidelines

The details presented in this section are demonstrated in Example S2PMDIF File. You are encouraged to review the example, then refer back to these guidelines for the detailed information.

VAR items VAR items are used to declare variables that distinguish different small signal/noise parameter pairs. The format is,

VAR <name> = <value>

Examples:

Note

VAR is a reserved keyword for the MDIF file. SAMPLE is a reserved variable for statistical analysis applications.

General information S2PMDIF supports

multiple small-signal and/or noise data pairs
or
one small-signal and/or noise data pair.

If the latter is used, no VAR declaration is required.

Comments Comments in the S2PMDIF are supported using ! or the REM statement. The ! may appear at the beginning of a line, or as a trailing comment at the end of a line. REM, however, may only serve as a leading comment on the beginning of a line. Examples:

S2PMDIF data blocks  S2PMDIF contains two main data blocks framed by BEGIN and END statements:

ACDATA

Lists small-signal parameters vs. frequency.
Framed by BEGIN ACDATA ... END.
The ACDATA block is required in the S2PMDIF file.

NDATA

Lists noise parameters vs. frequency.
Framed by BEGIN NDATA ... END.
The NDATA block is optional in the S2PMDIF file.

Supported small-signal parameters The ACDATA (small-signal parameter) block supports the small-signal parameter types S, Y, Z, H, or G.

Supported noise data The NDATA (noise data) block supports parameters NFMIN (minimum noise figure), Gamma Opt (optimal source reflection coefficient), and RN (noise resistance). This is supported for use with all small-signal parameter types.

Option line The option line declares data contained in the SFC m2PMDIF file. These are

  • The frequency units
  • The type of small-signal parameter
  • The format used to express the small signal parameters (ACDATA block) or optimum source reflection (NDATA) (Magnitude & Angle, Real & Imaginary, dB & Angle).

There are two option line formats:

#AC (freq_unit SS_ParmType SS_Parm_Format R Scaling/system impedance)
# freq_unit SS_ParmType SS_Parm_Format R Scaling/system

where:

freq_unit

=

Sets frequency units.
Options are Hz, KHz, MHz, or GHz.

SS_ParmType

=

Sets small-signal parameter type.
Options are: S, Y, Z, H, or G (default is S).

SS_Parm_format

=

Small signal parameter format.
Options are RI, MA, or DB (default is RI), where:
RI declares Real Imaginary Format
MA declares Magnitude Angle
DB is 20*Log(Parameter_Magnitude) Angle format

R Scaling/system

=

Declares scaling/system impedance
(default is 50 ohms)

Important Option Line Information

  • While both option line formats are supported, #AC(... ) is recommended.
  • Option lines are required in the file. If any are omitted, unpredictable results will occur.
  • Option lines may have different frequency units, small-signal parameter formats (e.g., MA, RI, and DB), and system/scaling impedance values in the same S2PMDIF file. However, the small-signal parameter type (e.g., S, Y, Z, H, G) must be the same for all option lines in the S2PMDIF file. Agilent recommends that the same option line be used throughout the same S2PMDIF file except where scaling differences require changes (e.g., noise data is not scaled, whereas S-parameter data has a normalizing system impedance).
  • If default SS_ParamType, SS_Param_format, and R Scaling/System are used, at a minimum, the freq_unit must appear in the option line. For example:
    #AC ( GHz ) - preferred format
    # GHz - alternative format (Touchstone based)
  • Option line syntax is case insensitive.
  • When entering parameters other than S-parameter data, typically R 1 is used, since some users who are accustomed to using S-parameters make the common mistake of entering R 50 Z-parameters. In that event, the Z-parameters would be scaled to an undesirable level.
  • If an option line is not specified within a data block in the file, the following default option line is used for that data: # hz R ri R 50 .

Signal Format Line The syntax for the signal format line is
% F n11x n11y n21x n21y n12x n12y n22x n22y

The signal format line comprises nine columns of data in the ACDATA block. The first column is frequency, the remaining columns pertain to small-signal parameters. In S2PMDIF, each two-port small-signal parameter is represented in two parts. The format being either Magnitude(x) and Angle(y), or Real(x) and Imaginary(y), or dB(x) and Angle(y). (See guideline for Option line above.) Given this, the small signal parameters are entered as eight columns of data. The format line has the following meaning where n is S, Y, Z, H, or G:

F

=

Frequency in Hz, kHz, MHz, or GHz.

n11x

=

Magnitude, real part, or dB value (depending which option is used) for small signal parameter n11.

n11y

=

Angle, or imaginary part (depending which option is used) for small signal parameter n11.

n21x

=

Magnitude, real part, or dB value (depending which option is used) for small signal parameter n21.

n21y

=

Angle, or imaginary part (depending which option is used) for small signal parameter n21.

n12x

=

Magnitude, real part, or dB value (depending which option is used) for small signal parameter n12.

n12y

=

Angle, or imaginary part (depending which option is used) for small signal parameter n12.

n22x

=

Magnitude, real part, or dB value (depending which option is used) for small signal parameter n22.

n22y

=

Angle, or imaginary part (depending which option is used) for small signal parameter n22.

When the small-signal parameter format is declared (Magnitude Angle, Real Imaginary, or dB Angle), all small-signal parameters assume that format. For example, if Magnitude Angle is declared, all small signal parameters assume magnitude and angle format. If Real Imaginary is declared, all parameters assume real and imaginary format. If MA, RI, or DB are not specified at all, the default format is RI.

Noise Format Line The syntax for the noise format line is

% F nfmin n11x n11y rn

The noise format line comprises five columns of data in the NDATA block.

F

=

Frequency in Hz, kHz, MHz, or GHz.

nfmin

=

Minimum noise figure.

n11x
n11y

=

The third and forth columns are optimum source reflection coefficient described as either Magnitude (n11x) and Angle (n11y), Real (n11x) and Imaginary (n11y), or DB (n11x) and Angle (n11y). (See guideline for Option line above.)

rn

=

Equivalent normalized noise resistance.

In the option line, when MA, RI, or DB is declared, it only pertains to the optimum source reflection coefficient data. If MA, RI, or DB are not specified at all, the default format is RI.

Example S2PMDIF File

The following example is annotated using single small signal, noise parameter data pair.

Additional Examples: ACDATA and NDATA Blocks

P2D Format

The large-signal or power-dependent S-parameter (.p2d) file is a system input file you create from an S-parameter file, inserting the MDIF format. You use the . p2d file to characterize the component by a complete set of 2-port large-signal S-parameters, accounting for power dependence of S21, S11, S22, and S12, plus optional noise data, and optional intermodulation data.

A .p2d file can also be created via simulation by placing a P2D simulation component from the LSSP Simulation Library in the design.

It possible to have multi-dimensional P2D files with VAR statements separating individual basic P2D sections. Such files may be automatically generated using the AmplifierP2D_Setup component from the System-Data Models library.

The format for a basic P2D section is shown here. Required keywords appear in UPPERCASE ITALIC characters.

!!! Begin basic P2D syntax
BEGIN ACDATA !!! required 2-port S-parameter data block
..... ( Required small signal section identical to ACDATA section of S2D format )
..... ( Optional large signal section - shown in the next section )
END ACDATA
BEGIN NDATA !!! optional 2-port noise data block
....
END NDATA
BEGIN IMTDATA !!! optional intermodulation table
....
END IMTDATA
!!! End basic P2D syntax

This format can be expanded to form a multi-dimensional P2D file using VAR statements. For instance a single P2D file containing two temperature points over three bias points contains a total of six basic sections as shown. Note that each sequence of VAR statements should preserve the order of the sweep, in this case temperature over bias and each sweep variable, for example, bias has its values arranged in monotonically increasing order. In this example B1 < B2 < B3 and T1 < T2 . Required keywords appear in UPPERCASE ITALIC characters.

VAR temp=T1
VAR bias=B1
...... ( 1st Basic P2D section )
VAR temp=T1
VAR bias=B2
...... ( 2nd Basic P2D section )
VAR temp=T1
VAR bias=B3
...... ( 3rd Basic P2D section )
VAR temp=T2
VAR bias=B1
...... ( 4th Basic P2D section )
VAR temp=T2
VAR bias=B2
...... ( 5th Basic P2D section )
VAR temp=T2
VAR bias=B3
...... ( 6th Basic P2D section )

Guidelines for .p2d

  • Basic MDIF syntax contains four reserved words. VAR begins an independent variable definition line, in the form VAR <name> = <value>. BEGIN <blockname> signals the beginning of a data block, and END signals the conclusion of a data block. A line beginning with REM or the comment symbol (!) will be assumed as comments.
  • VAR statements are used to specify multidimensional data, that is, two or more independent variables. The value of a VAR statement can be a number.
  • Multiple sets of data (ACDATA, NDATA, IMTDATA) can be used with VAR statements used before or after any dataset.
  • The file dataset is made up of data blocks, each separated by BEGIN and END statements. Three different types of data blocks are allowed:

    ACDATA

    =

    Lists small and large-signal parameters vs. frequency and power (required)

    NDATA

    =

    Lists noise parameters vs. frequency (optional)

    IMTDATA

    =

    Used for a 2-port frequency converter to give the single-tone intermodulation table (optional)

The ACDATA Block

The ACDATA block allows you to specify the small- and large-signal characteristics of the 2-port.

  • General format:
    BEGIN ACDATA
    # AC ( ....... ) ! this is the option line
    % .... ! this is a format line __
    ..... small-signal data goes here
    % F ! this is a format line
    ... first large-signal data frequency
    % P1 P2 ..... ! this is a format line
    ... large-signal data at first frequency
    % F ! next large-signal frequency
    ... second large-signal data frequency
    % P1 P2 ....
    ... large-signal data at second frequency
    ...
    ... additional sets of large- signal frequency and data
    ...
    END
  • Option line:
    # AC( unit parm_type parm_format R xx FC m b )
    where:

    unit

    =

    Sets the frequency unit.
    Options are HZ, KHZ, MHZ, or GHZ.

    parm_type

    =

    Only S-parameters are allowed; use S only.

    parm_format

    =

    MA, DB, RI, VDB sets the format for the four network parameters, where:
    MA declares magnitude and angle (degrees)
    DB is for 20log10( MA) and angle (degrees)
    RI declares real and imaginary
    VDB declares n11 and n22 as VSWR and angle (degrees) and n21 and n12 as DB and angle (degrees)

    R xx

    =

    Declares resistance, where xx = normalization resistance.

    FC m b

    =

    Declares input to output frequency conversion where
    Fout = mFin + b ; where:
    m is for frequency multiplication
    b is for frequency translation

  • Small-signal format line:
    % F n11x n11y n21x n21y n12x n12y n22x n22y
    This line gives the order for the data in the lines to follow. All of the keywords shown must be given in the format line. The order of these keywords is arbitrary. The order shown is preferred.

    F

    =

    For frequency data

    n11x, n11y

    =

    The 11 data pair for the 2 port data matrix

    n21x, n21y

    =

    The 21 data pair

    n12x, n12y

    =

    The 12 data pair

    n22x, n22y

    =

    The 22 data pair


    If the parameter type = S, and the parameter format = DB, then
    n11x = |S11| in dB, and n11y = angle of S11 in degrees.
  • Large-signal format line:
    % F
    This line precedes the frequency for the following large-signal data.
    % P1 P2 n11x n11y n21x n21y n12x n12y n22x n22y
    This line precedes the large-signal data. The large-signal data may have up to 101 sets of power data per frequency.
    All of the keywords shown must be given in the format line. While the order of keywords is arbitrary, the order shown is preferred.

    P1

    =

    The power (dBm) incident at port 1 with port 2 terminated in R ohms, for the measurement of S11 and S21

    P2

    =

    The power (dBm) incident at port 2 with port 1 terminated in R ohms, for the measurement of S22 and S12

    In the following data, a value of 1000 (1.e3) for the P2 data indicates that the S22 and S12 data are for small-signal measurement.

    n11x, n11y

    =

    The 11 data pair for the 2 port data matrix

    n21x, n21y

    =

    The 21 data pair

    n12x, n12y

    =

    The 12 data pair

    n22x, n22y

    =

    The 22 data pair


    If the parameter type = S, and the parameter format = DB, then n11x = |S11| in dB, and n11y = angle of S11 in degrees.

ACDATA Block Examples

2-port with 50-ohm S-parameters:

2-port frequency converter with variable RF freq, variable LO freq, fixed IF freq, fixed LO power, and RF-to-IF 2-port 50-ohm S-parameters:

2-port frequency converter with variable RF freq, fixed LO freq, variable IF freq, fixed LO power, and RF-to-IF 2 port 50-ohm S-parameters:

The NDATA Block

The NDATA block allows the user to specify the small-signal noise characteristics of the 2-port.

  • General format:
    BEGIN NDATA
    # AC ( ....... ) ! this is the option line
    % .... ! this is the format line
    ..... data goes here
    END
  • Option line:
    # AC( freq_unit parm_type parm_format R xx )
    where:

    freq_unit

    =

    Sets the frequency unit.
    Options are HZ, KHZ, MHZ, or GHZ.

    parm_type

    =

    S sets the source noise match type to optimum source reflection coefficient.

    parm_format

    =

    MA, DB, RI sets the format for the optimum source match, where:
    MA declares magnitude and angle (degrees)
    DB declares 20log10( MA) and angle (degrees)
    RI declares real and imaginary

    R xx

    =

    Declares resistance, where xx = normalization resistance for the source match and rn.

  • Format line:
    % F nfmin n11x n11y rn
    This line gives the order for the data in the lines to follow. All of the keywords shown must be given in the format line. While the order of keywords is arbitrary, the order shown is preferred

    F

    =

    For frequency data

    nfmin

    =

    For minimum noise figure data

    n11x, n11y

    =

    For the optimum source impedance for minimum noise figure

    rn

    =

    For the equivalent input normalized noise resistance. The system simulator requires this parameter to meet physical requirements. If the user-supplied rn value is less than allowed for this requirement, then the system simulator will force this rn value to the lowest physical limit.

The IMTDATA Block

The IMTDATA data block allows you to specify for a 2-port frequency converter the single tone output intermodulation levels with respect to the fundamental output tone.

  • General format:
    BEGIN
    reference_signal_power reference_LO_power
    ....... IMT data goes here
    END
    This data is given for specific LO and RF input power levels. However, during a system simulator spurious signal analysis, the data is adjusted for the actual converter input signal and LO power levels.
  • Example
    In the IMT table:
    • The vertical row number, N, (0, 1, to 15) indicates the harmonic of the signal used in deriving the spurious output signal.
    • The horizontal column number, M, (0, 1, to 15) indicates the harmonic of the local oscillator used in deriving the spurious output signal.
    • In row 2, column 4, the data is 13. This means that for an input signal at -10 dBm input, with an LO drive of +7dBm, an output spurious signal will occur at 3*LO + 1*signal, with a level that is 13 dB below the fundamental output signal.
    • If the input signal differs from the -10 dBm reference power level listed at the top of the table by X dB, then the number in the table is adjusted by adding (N-1)•X dB to it. This manner of adjustment is good for input power levels up to 5 dB greater than the reference signal power.
    • If the local oscillator signal differs from the +7 dBm reference power level listed at the top of the table by X dB, then the number in the table is adjusted by adding it by M•X dB to it. This manner of adjustment is good for local oscillator power levels from the reference level minus 10 dB to the reference level plus 3 dB.
    • The data values must fall in the range of 0 to 99. Numbers outside this range will cause an error.
    • The "#IMT ( )" is optional. Signal and LO reference power levels can be listed without this.
    • IMT data can be in square or triangular format.

Example .p2d File

S2D Format

The S-parameter Data (.s2d ) file is a system input file you create from an S-parameter file, inserting the MDIF format. In the .s2d file, you describe small-signal data, optional noise data, optional nonlinear data, and optional intermodulation data. You can describe nonlinearity as a function of drive power or nonlinear parameter consisting of some combination of third-order intercept point, 1dB gain compression, saturated output power, and gain compression at saturation. In ADS, it possible to have multidimensional S2D files with VAR statements separating individual basic S2D sections. Such files may be automatically generated using the AmplifierS2D_Setup component from the System-Data Models library.

The format for a basic S2D section is shown here. Required keywords appear in UPPERCASE ITALIC characters.

!!! Begin basic S2D syntax
BEGIN ACDATA !!! optional small-signal data block
....
END ACDATA
BEGIN GCOMPx !!! required compression information x=(1,...,7)
!!! only one type of GCOMPx supported in one S2D file
....
END GCOMPx
BEGIN NDATA !!! optional 2-port noise data block
....
END NDATA
BEGIN IMTDATA !!! optional intermodulation table
....
END IMTDATA
!!! End basic S2D syntax

This format can be expanded to form a multi-dimensional S2D file using VAR statements in ADS. For instance a single S2D file containing two temperature points over three bias points contains a total of six basic sections as shown. Note that each sequence of VAR statements should preserve the order of the sweep, in this case, temperature over bias and each sweep variable. For example, bias has its values arranged in monotonically increasing order. In this example B1 < B2 < B3 and T1 < T2. Required keywords appear in UPPERCASE ITALIC characters:

VAR temp=T1
VAR bias=B1
...... ( 1st basic S2D section )
VAR temp=T1
VAR bias=B2
...... ( 2nd basic S2D section )
VAR temp=T1
VAR bias=B3
...... ( 3rd basic S2D section )
VAR temp=T2
VAR bias=B1
...... ( 4th basic S2D section )
VAR temp=T2
VAR bias=B2
...... ( 5th basic S2D section )
VAR temp=T2
VAR bias=B3
...... ( 6th basic S2D section )

Guidelines for .s2d

  • Basic MDIF syntax contains four reserved words:
    • VAR begins an independent variable definition line, in the form VAR <name> = <value>.
    • BEGIN <blockname> signals the beginning of a data block.
    • END signals the conclusion of a data block.
    • REM or the comment symbol (!) at the beginning of a line signifies a comment.
  • VAR statements are used to specify multidimensional data, that is, two or more independent variables. The value of a VAR statement can be a number.
  • Comments can be inserted on any line within the file and must be preceded by a comment symbol (!).
  • Multiple sets of data (ACDATA, NDATA, GCOMP, IMTDATA) can be used with VAR statements before or after any dataset. Note that only one type of GCOMP block can be used in a single S2D file, for instance do not create an S2D file containing one GCOMP3 and one GCOMP5 block.
  • Each block of ACDATA, NDATA, GCOMPx can be headed by an option line such as #ACDATA ( MHz S RI R 50 ) to allow scaling and type definition for the network and its parameters.
  • The file dataset is made up of data blocks, each separated by BEGIN and END statements. The following ten different types of data blocks are allowed:

    ACDATA

    Lists small-signal network parameters vs. frequency (required)

    NDATA

    Lists noise parameters vs. frequency (optional)

    GCOMP1

    Lists output 3rd order intercept (IP3) (optional)

    GCOMP2

    Lists output 1dB gain compression power (IDBC) (optional)

    GCOMP3

    Lists output IP3 and 1DBC (optional)

    GCOMP4

    Lists output IP3 and output saturation power (PS) and gain compression at saturation (GCS) (optional)

    GCOMP5

    Lists output 1DBC, PS, and GCS (optional)

    GCOMP6

    Lists output IP3, 1DBC, PS, and GCS (optional)

    GCOMP7

    Lists S21 as a function of input power at a single frequency (optional)

    IMTDATA

    Used for a 2-port frequency converter to give the single-tone intermodulation table (optional)

  • One or more spaces or tabs separate entries on a line. Names can be mixed case-the file reader will store them as lowercase.
  • Multi-dimensional IMT tables are not supported. Only one IMT table may be present in a single S2D if necessary.

The ACDATA Block

The ACDATA block allows you to specify the small-signal characteristics of the 2-port.

  • General format:
    BEGIN ACDATA
    # AC ( ....... ) ! this is the option line
    % .... ! this is the format line
    ..... data goes here
    END
  • Option line syntax:
    # AC( freq-unit parm-type parm-format R xx FC m b )
    where:

    freq-unit

    =

    Sets the frequency units.
    Options are: HZ, KHZ, MHZ, GHZ.

    parm-type

    =

    Sets the 2-port network parameter option
    using S, Z, Y, H, or G.

    parm-format

    =

    Sets the format for the four network parameters using
    MA, DB, RI, VDB, where:
    MA declares magnitude and angle (degrees)
    DB is 20• log10(MA) and angle (degrees)
    RI declares real and imaginary
    VDB declares n11 and n22 as VSWR and angle (degrees) and n12 and n21 as DB and angle (degrees)

    R xx

    =

    Declares resistance, where xx = normalization resistance

    FC m b

    =

    Declares input to output frequency conversion such that
    Fout = m•Fin + b where:
    m is for frequency multiplication
    b is for frequency translation

  • Example:
    #AC (MHZ S MA R 50 FC 0 30)
    would set the frequency units to MHZ, 2-port parameters to S, 2-port parameter format to magnitude and angle, reference resistance to 50 ohms, frequency conversion to 30 MHZ of constant output frequency.

    FC 1 0

    Sets the output frequency equal to the input frequency
    ( Fout = 1 • Fin + 0 )

    FC -1 30

    Sets the output frequency to 30 minus the input frequency
    ( Fout = -1 • Fin + 30 )

  • Format line:
    % F n11x n11y n21x n21y n12x n12y n22x n22y
    This line gives the order for the data in the lines to follow. All of the keywords shown must be given in the format line. While the order of keywords is arbitrary, the order shown is preferred.

    F

    =

    Frequency data column

    n11x, n11y

    =

    The 11 data pair for the 2 port data matrix

    n21x, n21y

    =

    The 21 data pair

    n12x, n12y

    =

    The 12 data pair

    n22x, n22y

    =

    The 22 data pair

    where these data pairs belong to the 2-port characterization matrix:
  • Examples
    The following examples illustrate the ACDATA block with various data options:
    2-port with 50-ohm S-parameters:
    2-port frequency converter with variable RF freq, fixed LO freq, variable IF freq, fixed LO power, and RF-to-IF 2-port 50-ohm S-parameters:

The NDATA Block

The NDATA block allows you to specify the small-signal noise characteristics of the 2-port.

  • General format:
    BEGIN NDATA
    # AC ( ....... ) ! this is the option line
    % .... ! this is the format line
    ..... data goes here
    END
  • Option line syntax:
    # AC( freq-unit parm-type parm-format R xx )
    where:

    freq-unit

    =

    HZ, KHZ, MHZ, or GHZ sets the frequency units.

    parm-type

    =

    S only, source reflection coefficient.

    parm-format

    =

    MA, DB, RI sets the format for optimum source match, where:
    MA declares magnitude and angle (degrees)
    DB declares 20log10( MA) and angle (degrees)
    RI declares real and imaginary

    R xx

    =

    Declares resistance where xx = normalization resistance for the source match and noise resistance.

  • Format line syntax:
    % F nfmin n11x n11y rn
    This line gives the order for the data in the lines to follow. All of the keywords shown must be given in the format line. While the order of keywords is arbitrary, the order shown is preferred.

    F

    =

    Frequency data column.

    nfmin

    =

    For minimum noise figure data.

    n11x, n11y

    =

    For the optimum source reflection coefficient for minimum noise figure.

    rn

    =

    For the equivalent normalized input noise resistance of the 2-port. The system simulator requires this parameter to meet physical requirements. If the user-supplied rn value is less than allowed for this requirement, then the system simulator will force this rn value to the lowest physical limit.

    For more information on noise figure, see S-Parameter Simulation Noise Analysis.
    The following is an example of the NDATA block:

Understanding GCOMP Data

There are seven mutually exclusive formats for expressing large signal response in an S2D file, each corresponding to one type of GCOMP block. GCOMP stands for gain compression, indicating that only forward transmission behavior of the device under large signal conditions is captured here. Each GCOMP section may optionally contain multiple profiles, each at a different gain compression frequency. Various nonlinear device models refer to these frequencies as GCFreq or GainCompFreq.

GCOMP1 through GCOMP6 use parametric specifications whereas GCOMP7 uses a data-based profile. As such, the first six types of GCOMP blocks are restricted in the modeling capability of nonlinear behavior whereas GCOMP7 can represent any arbitrary response including gain expansion regions.

GCOMP1 through GCOMP6 use various combinations of the following four standard measures of nonlinear behavior, all referenced to the abscissa of an output (dBm) versus input power (dBm) plot in:

  • IP3 - Third order intercept point in dBm, usually referenced to output power axis. This is a theoretical point where the power of the fundamental at the output of the nonlinear device would have equalled that of the third harmonic if there were no expansion or compression effects at high input drives.
  • 1DBC - 1 dB compression point in dBm, usually referenced to output power axis. This parameter marks the onset of nonlinear behavior and refers to the point where actual output power at the fundamental tone is 1 dB below the predicted linear output power.
  • PS - Power at saturation in dBm refers to the maximum possible output power at fundamental frequency under normal operating conditions, that is, prior to breakdown due to high input drive.
  • GCS - Gain compression at saturation in dB, refers to the amount of compression with respect to linear behavior at the onset of saturation of the output fundamental frequency.

System level components that can interpret S2D profiles use an odd-order polynomial fitting to emulate narrow-band nonlinear behavior based on GCOMP information. The amount of compression information available for polynomial fitting depends on the GCOMP convention as follows:

  • GCOMP1 and GCOMP2 each enable the modeling of 3rd order nonlinear behavior.
  • GCOMP3 is modelled using a 5th order polynomial.
  • GCOMP5 and GCOMP5 require a 7th order polynomial.
  • GCOMP6 includes all four parameters and requires 9th order polynomial fitting.
  • GCOMP7 fits to 3rd through 7th (odd) orders if 3-7 data points are specified. If more than seven data points are specified, it performs a 9th order polynomial fitting of the nonlinearity.

The following seven sections show the format for each GCOMP type. Note that each type of block can have an multiple sections each delineated by an optional compression frequency line as shown in the following generic example. Required keywords appear in UPPERCASE ITALIC characters:

BEGIN GCOMPx
% F
comp_freq_A
% ( option line for block-type x )
.... ( data for block-type x at fundamental output frequency A )
% F
comp_freq_B
% ( option line for block-type x )
.... ( data for block-type x at fundamental output frequency B )
......
% F
comp_freq_F
% ( option line for block-type x )
.... ( data for block-type x at fundamental output frequency F )
END GCOMPx

The GCOMP1 Block

The GCOMP1 data block for the .s2d data file allows you to specify the 2-port 3rd order output intercept (IP3). No option line is used.

  • General format:
    BEGIN GCOMP1
    % IP3 ! this is the format line, required
    ..... data goes here
    END
  • Format line (required):
    % IP3
  • Example:

The GCOMP2 Block

The GCOMP2 data block for the .s2d data file allows you to specify the 2-port output power at 1 dB gain compression. No option line is used.

  • General format:
    BEGIN GCOMP2
    % 1DBC ! this is the format line, required .
    ..... data goes here
    END
  • Format line (required):
    % 1DBC
  • Example:

The GCOMP3 Block

The GCOMP3 data block for the .s2d data file allows you to specify the 2-port output IP3 and 1DBC simultaneously. No option line is used.

  • General format:
    BEGIN GCOMP3
    % 1DBC IP3 ! this is the format line
    ..... data goes here
    END
  • Format line:
    % 1DBC IP3
    This line gives the order for the data in lines to follow. All keywords shown must be given in the format line; keyword order is arbitrary.
  • Example:

The GCOMP4 Block

The GCOMP4 data block for the .s2d data file allows you to specify the 2-port output IP3, output power at saturation (PS), and the gain compression at saturation (GCS). No option line is used.

  • General format:
    BEGIN GCOMP4
    % IP3 PS GCS ! this is the format line
    ..... data goes here
    END
  • Format line syntax:
    % IP3 PS GCS
    This line gives the order for the data in the lines to follow. All keywords shown must be given in the format line; keyword order is arbitrary.
  • Example:

The GCOMP5 Block

The GCOMP5 data block for the .s2d data file allows you to specify the 2-port output 1DBC, output power at saturation (PS), and the gain compression at saturation (GCS). No option line is used.

  • General format:
    BEGIN GCOMP5
    % 1DBC PS GCS ! this is the format line
    ..... data goes here
    END
  • Format line syntax:
    % 1DBC PS GCS
    This line gives the order for the data in the lines to follow. All of the keywords shown must be given in the format line; keyword order is arbitrary.
  • Example:

The GCOMP6 Block

The GCOMP6 data block for the .s2d data file allows you to specify the 2-port output IP3, 1DBC, output power at saturation (PS), and the gain compression at saturation (GCS). No option line is used.

  • General format:
    BEGIN GCOMP6
    % IP3 1DBC PS GCS ! this is the format line
    ..... data goes here
    END
  • Format line:
    % IP3 1DBC PS GCS
    This line gives the order for the data in the lines to follow. All of the keywords shown must be given in the format line; keyword order is arbitrary.
  • Example:

The GCOMP7 Block

The GCOMP7 data block for the . s2d data file enables you to specify the input-to-output gain compression characteristic by listing the differential dB gain and differential phase as a function of input power in tabular form.

The S2D file format allows gain compression data at multiple frequencies to be specified in the GCOMP7 block. Note, however, that the AmplifierS2D component – with which many S2D files are later associated – cannot interpolate between gain compression data at different frequencies but uses a fixed frequency specified by the parameter GCfreq . If the compression behavior is to hold true at multiple frequencies, separate GCOMP7 blocks must be defined for each indexing frequency within the same .s2d data file.

It is important to note that the values of S21x and S21y contained in the GCOMP7 section are not the absolute S-parameter responses of the system at the relevant input power. They are differences with respect to the small signal values recorded in the ACDATA section at the same frequency. For instance, if the small signal S21 response at frequency F is polar(ss21mag, ss21deg), and the actual large signal S21 at power PinX at the same frequency F is polar(ls21mag, ls21deg), then the GCOMP7 entry for PinX will register the value of polar(ds21mag, ds21deg) where:

ds21mag = 10**(20*log10(ls21mag/ss21mag)/20) = ls21mag/ss21mag

ds21deg = ls21deg - ss21deg

Please note that regardless of the final format in which the small signal S-parameters [ssijmag, ssijdeg] or the [ds21mag, ds21deg] pairs are expressed in the data file, the dB domain differential definition of the GCOMP7 sections S21 values always holds as mentioned above. Caution must be employed when manually generating or interpreting the contents of the GCOMP7 section and all variables converted to dB domain before numerically adding / subtracting to compute the actual S21values at PinX power.

  • General format:
    BEGIN GCOMP7
    # AC ( ....... ) ! this is the option line
    % ....! this is format line 1
    ..... frequency goes here
    % ....! this is format line 2
    ..... data goes here
    END
  • Option line syntax:
    # AC( freq-dim parm-type power-nit parm_format R xx )
    where:

    freq-dim

    =

    Sets the frequency units.
    Options are HZ, KHZ, MHZ, or GHZ.

    parm-type

    =

    S only.

    power_dim

    =

    DBM only.

    parm_format

    =

    Sets the format for S21 using MA, DB, RI, where:
    MA declares magnitude and angle (degrees)
    DB declares 20log10( MA) and angle (degrees)
    RI declares real and imaginary

    R xx

    =

    Declares resistance, where xx = reference resistance for S-parameters.

  • Format line:
    There are two format lines:
    % F format line 1
    % PIN n21x, n21y format line 2
    where:

    F

    =

    Indicates that the following data point is the frequency (only one frequency can be specified).

    PIN

    =

    The input power.

    n21x, n21y

    =

    The S21 dB-differential data pair which may be expressed in DB, MA, or RI formats (default is RI).

    These lines give the order for the data in the lines to follow. All of the keywords shown must be given in the format line. The order of these keywords is arbitrary.
  • Example:

Complete .s2d File Example

IMT Format

Intermodulation table (IMT) data is used to represent the behavior of mixers and frequency translators. Three distinct types of IMT formats are supported in ADS. See the following sections for descriptions and examples:

O-Type IMT Format

Standard spur tables for mixers are defined in this format which allows only single side banded (SSB), single-RF, single-LO mixing specification of IF voltage strengths in dB (relative to IF fundamental) or dBm (absolute value). Such files contain only a single IMT matrix preceded by an option line containing reference values of RF and LO signal strengths. O-type IMT files do not contain any information regarding actual RF or LO frequencies, and therefore, may be used to characterize a generic mixing process. Each column of the table represents mixing due to one of the N harmonics of the LO tone and each row represents mixing one of the M harmonics of the RF tone.

Example O-Type IM Table

In the following O-type IM table, five LO harmonics are mixed with three RF harmonics. All values are non-negative and the IF fundamental strength is 0 dB. This indicates that all the spurs are suppressed with respect to the IF fundamental by the specified value. Thus, the IM products for 3*RFfreq + 2*LOfreq and 3*RFfreq - 2*LOfreq are both suppressed by 69 dB below the strength of the IF fundamental when reference RF and LO powers at mixer inputs are -10 dBm and +7 dBm respectively. There is no specific distinction between sum and difference products, and the table contains no information about IF phase.

A-Type IMT Format

IM tables extracted from mixers in simulation environment are defined in this format which allows double side banded (DSB), single-RF, single-LO mixing specification of IF voltage strengths in dBm (absolute value). Such files may contain multiple IMT matrices each captured at specific levels of RF and LO powers and input frequencies. A-type IMT files therefore contain frequency specific information, and may be used for interpolation across modest spans of RF or LO frequency and power variation. Each column of the table represents mixing due to one of the N harmonics of the LO tone, and each row represents mixing one of the M harmonics of the RF tone. Both positive (sum) and negative (difference) rows are represented in the table as shown by the value of the first column.

Example A-Type IM Table

In the following A-type IM table two LO harmonics are mixed with two RF harmonics. The IM product for 2*RFfreq + 2*LOfreq is -40 dBm at 23 degrees phase; whereas, the product for 2*RFfreq - 2*LOfreq is -50 dBm at -41 degrees phase when reference RF and LO powers at mixer inputs are -10 dBm and +7 dBm respectively, and reference frequencies are RFfreq=2 GHz and LOfreq=1.7 GHz. Although, for the difference tone the table shows -2*FRF + 2*FLO, given that FLO < FRF in this case, we get the phase as -41 degrees by taking the complex conjugate of the value on file which is +41 degrees. To represent a physically feasible system, the values in the first complex column which contain harmonics of the RF tone, should be complex conjugates when mirrored across the DC spur. Thus the spur at N=0, M=m should be the complex conjugate of the spur at N=0, M=-m.

B-Type IMT Format

IM tables extracted from mixers in the simulation environment are defined in this format which allows double side banded (DSB), multi-RF, single-LO mixing specification of IF voltage strengths in dBm (absolute value). Such files may contain multiple IMT matrices each captured at specific levels of LO powers and frequencies. RF frequencies and powers should remain constant throughout the file. B-type IMT files therefore contain frequency specific information, and may be used for interpolation across modest spans of LO frequency and power variation at nominal RF powers and frequencies. Each column of the table represents mixing due to one of the N harmonics of the LO tone and each row represents mixing the various harmonics of the RF tones. Both positive (sum) and negative (difference) rows are represented in the table as shown by the value of the first r columns where r RF tones are active at the mixer's signal input.

To represent a physically feasible system, the values in the first complex column which contain pure RF on RF mixing, should be complex conjugates when mirrored across the DC spur. Thus the spur at N=0, M1=m1 M2=m2 should be the complex conjugate of the spur at N=0, M1=-m1, M2=-m2.

Example B-Type IM Table

In the following B-type IM table two LO harmonics are mixed with two RF harmonics of the first RF tone and one harmonic of the second RF tone. The IM product for 2*RFfreq1 - RFfreq2 + 2*LOfreq is -71 dBm at 64 degrees phase; whereas, the product at -RFfreq1 + RFfreq2 is -45 dBm +66 degrees.

SPW Format

These files contain time-domain waveform data and are signal data files in SPW format. Advanced Design System can interface with the Cadence Alta Group SPW format through the use of data files in SPW format. Both ASCII (.ascsig ) and binary (.sig ) file formats are supported.

The SPW version 3.0 data file format is fully supported for real double data and partially supported for complex double data.

Guidelines for .ascsig

  • The SPW version 3.0 data file format must be used.
  • Comments can only be included on the one line following the $USER_COMMENT statement.
  • A blank line must be included above the statements $COMMON_INFO and Sampling Frequency.

Example .ascsig Files

There are two examples, one uses real values and the second uses complex numbers.

File 1: Real double-data format

File 2: Complex double-data format

TIM Format

The .tim file is a signal data file in MDIF format. It contains time-domain waveform data for defining the signals associated with certain sources.

The general .tim file format is:

BEGIN TIMEDATA
# T ( SEC V R xx )
% time voltage
<data line>
...
<data line>
END

The BINTIM Format

The BINTIM format (.bintim) is for binary time-domain waveform data files. In .bintim files, the format is the same as .tim files, except the BEGIN line is preceded by a line indicating the number of data points, n:

NUMBER OF DATA n

The <data line> in a .bintim file is just a binary dump of all the waveform (time, voltage) data. Also, there is no END line.

Note

The .bintim format is not supported in the Data File Tool. However, certain signal processing components can read .bintim files.


Guidelines for .tim Files

  • An exclamation point (!) at the beginning of a line makes it a comment line. Characters following the ! are ignored by the program.
  • The TIMEDATA data block is required.
  • When the file reader reads a file, it renames the independent and dependent variable names regardless of the names specified in the file. The file reader reads the independent variable name as time , and the dependent variable name as voltage .

TIMEDATA Block

  • The BEGIN statement:
    BEGIN TIMEDATA ! Begin time-domain waveform data
  • Option line:
    # T ( time_unit data_unit R xx )
    where:

    #

    =

    Delimiter tells the program you are specifying these parameters.

    T

    =

    Time

    time_unit

    =

    Sets time units. Options are SEC, MSEC, USEC, NSEC, PSEC.

    data_unit

    =

    Set the units for the voltage values. Options are:
    V = volts
    MV = millivolts

    R xx

    =

    Sets resistance, where xx = reference resistance. (default is 50.0)

  • Format line
    % time voltage
    where:

    %

    =

    Delimiter tells the program you are specifying these parameters

    time

    =

    time

    voltage

    =

    voltage

    By design of the program, the syntax time and voltage in the Format line are arbitrary. These values can be whatever you prefer. For example, an option line such as:
    % t mV
    can be used. However, these values are converted to time and voltage by the file reader when the .tim file is imported, and these will be the variables appearing in a dataset (.ds ) file.
  • The TIMEDATA data requirements are as follows:
    • Though a value for time=0 is not required, this can lead to erroneous results when using the DataAccessComponent with its Extrapolation Mode set to Linear. To avoid errors, set a value for time=0, set the DAC's Extrapolation Mode to Constant, or do both.
    • The signal is assumed to be time periodic with the time period equal to maximum time minus minimum time.

Example .tim Files

This example file results in a time periodic voltage versus time with time period 32 µsec, interpreted as a piece-wise linear voltage description.


Time periodic voltage vs. Time with time period 32 µsec.

The following example shows how to handle the independent and dependent variable names when using a DataAccessComponent. This is useful since the file reader reads the independent variable name as time , and the dependent variable name as voltage , regardless of the names specified in the file. The following example data files shows the variable names specified as t and v:

Though the variable names are t and v , the file reader changes the names to time and voltage , requiring the following syntax for the DataAccessComponent:

Generic MDIF

The generic MDIF provides a generalized MDIF format for unifying the various specific MDIF formats, and overcoming some limitations of other formats. The generic format enables diverse applications to use a common data I/O interface, so long as the intent is to access/save multidimensional (multiple independent vs dependent variables) data.

The general format is as follows:

where var*Type can be the token:

0 or int
1 or real
2 or string

Type bVar*Type can be one of the above as well as:

3 or complex
4 or boolean
5 or binary
6 or octal
7 or hexadecimal
8 or byte16

The variable names above constitute a name-space uniquely identified by the string blockName which is either:

  • alphanumeric: all bVar*Name block variables are dependent, except bVar1Name, which is usually the most rapidly changing (innermost) independent variable.
    or
  • DSCR(blockName): all bVar*Name block variables are dependent, and there is an indexing implicit independent variable.

Guidelines

  • A string type variable's value must be surrounded by "".
  • If there are multiple blocks, the outermost independent variables (e.g., VAR var1Name(var1Type) = var1 ) apply only to the block immediately following the variable definitions, and not to any other blocks.
  • The block data (bVar*Value) lines must follow the pattern (order, number of values per line, and number of lines) of the format (%) lines. If the number of values in any data line does not match the number of dependent variables specified in the corresponding format (%) line, incorrect results will occur. A variable's value cannot be split across lines. Although there is no line length limit specified, MDIF file readers may choose to truncate at some finite length. This may result in a file read error, or, if the file was carefully crafted, truncated names and/or string-type values.
  • Scale factors, which can be applied only to real numbers, may be case-insensitive suffixes as follows:

    f = 1e-15, p = 1e-12, n = 1e-9, u = 1e-6, mil = 2.54e-5, m = 1e-3,

    k = 1e3, g = 1e9, t = 1e12

    E.g.: 15mA = 15e-3, 30KHz = 30e3

    There should be no space between the number and the suffix, and extra characters are ignored. Unrecognized suffixes result in 1.0. The above is not totally consistent with the rest of ADS.
  • The format of complex data is real/imag, with a column for real and a column for imaginary.
  • Multidimensional data is organized by outer to inner independent variables. VAR statements go from outermost to innermost.
  • Vary innermost independent variables first, proceeding toward outermost variables changing last.
  • Independent variables should change monotonically.

Example

CITIfile Data Format

This section describes the CITIfile format definitions of key terms, and file examples. It also includes:

  • Keyword reference
  • File guidelines
  • Instructions for converting between disk formats
  • Device-specific definitions
  • File name requirements

Overview

CITIfile is a standardized data format that is used for exchanging data between different computers and instruments. CITIfile stands for Common Instrumentation Transfer and Interchange file format.

This standard is a group effort between instrument and computer-aided design program designers. As much as possible, CITIfile meets current needs for data transfer, and it is designed to be expandable so it can meet future needs.

CITIfile defines how the data inside an ASCII package is formatted. Since it is not tied to any particular disk or transfer format, it can be used with any operating system, such as DOS or UNIX, with any disk format, such as DOS or HFS, or with any transfer mechanism, such as by disk, LAN, or GPIB.

By careful implementation of the standard, instruments and software packages using CITIfile are able to load and work with data created on another instrument or computer. It is possible, for example, for a network analyzer to directly load and display data measured on a scalar analyzer, or for a software package running on a computer to read data measured on the network analyzer.

Data Formats

There are two main types of data formats: binary and ASCII. CITIfile uses the ASCII text format. Although this format requires more space than binary format, ASCII data is a transportable, standard type of format which is supported by all operating systems. In addition, the ASCII format is accepted by most text editors. This allows files to be created, examined, and edited easily, making CITIfile easier to test and debug.

File and Operating System Formats

CITIfile is a data storage convention designed to be independent of the operating system, and therefore may be implemented by any file system. However, transfer between file systems may sometimes be necessary. You can use any software that has the ability to transfer ASCII files between systems to transfer CITIfile data. Refer to Converting Between Disk Formats for more information.

The descriptions and examples shown here demonstrate how CITIfile may be used to store and transfer both measurement information and data. The use of a single, common format allows data to be easily moved between instruments and computers.

CITIfile Definitions

This section defines: package , header , data array , and keyword .

Package

A typical CITIfile package is divided into two parts:

  • The header is made up of keywords and setup information.
  • The data usually consists of one or more arrays of data.

The following example shows the basic structure of a CITIfile package:

When stored in a file there may be more than one CITIfile package. With the Agilent 8510 network analyzer, for example, storing a memory all will save all eight of the memories held in the instrument. This results in a single file that contains eight CITIfile packages .

Header

The header section contains information about the data that will follow. It may also include information about the setup of the instrument that measured the data. The CITIfile header shown in the first example has the minimum of information necessary; no instrument setup information was included.

Data Array

An array is numeric data that is arranged with one data element per line. A CITIfile package may contain more than one array of data. Arrays of data start after the BEGIN keyword, and the END keyword follows the last data element in an array.

A CITIfile package does not necessarily need to include data arrays. For instance, CITIfile could be used to store the current state of an instrument. In that case the keywords VAR , BEGIN , and END would not be required.

When accessing arrays via the DAC (DataAccessComponent), the simulator requires array elements to be listed completely and in order.

Example: S[1,1], S[1,2], S[2,1], S[2,2]

Keywords

Keywords are always the first word on a new line. They are always one continuous word without embedded spaces. A listing of all the keywords used in version A.01.00 of CITIfile is shown in CITIfile Keyword Reference.

CITIfile Examples

The following are examples of CITIfile packages.

Display Memory File

This example shows an Agilent 8510 display memory file. The file contains no frequency information. Some instruments do not keep frequency information for display memory data, so this information is not included in the CITIfile package.

Note that instrument-specific information (#NA = network analyzer information) is also stored in this file.

Agilent 8510 Data File

This example shows an 8510 data file, a package created from the data register of an Agilent 8510 network analyzer. In this case, 10 points of real and imaginary data was stored, and frequency information was recorded in a segment list table.

Agilent 8510 3-Term Frequency List Cal Set File

This example shows an 8510 3-term frequency list cal set file. It shows how CITIfile may be used to store instrument setup information. In the case of an 8510 cal set, a limited instrument state is needed to return the instrument to the same state that it was in when the calibration was done.

Three arrays of error correction data are defined by using three DATA statements. Some instruments require these arrays be in the proper order, from E[1] to E[3] . In general, CITIfile implementations should strive to handle data arrays that are arranged in any order.

When an instrument's frequency list mode is used, as it was in this example, a list of frequencies is stored in the file after the VAR_LIST_BEGIN statement. The unsorted frequency list segments used by this instrument to create the VAR_LIST_BEGIN data are defined in the #NA ARB_SEG statements.

2-Port S-Parameter Data File

This example shows how a CITIfile can store 2-port S-parameter data. The independent variable name FREQ has two values located in the VAR_LIST_BEGIN section. The four DATA name definitions indicate there are four data arrays in the CITIfile package located in the BEGIN...END sections. The data must be in the correct order to ensure values are assigned to the intended ports. The order in this example results in data assigned to the ports as shown in the table that follows:

DATA

FREQ = 1E9

FREQ = 2E9

s[1,1]

s[0.1,2]

s[0.2,3]

s[1,2]

s[0.3,4]

s[0.4,5]

s[2,1]

s[0.5,6]

s[0.6,7]

s[2,2]

s[0.7,8]

s[0.8,9]

CITIfile Keyword Reference

The following table lists keywords, definitions, and examples.

CITIfile Keywords and Definitions

Keyword

Example and Explanation

CITIFILE

Example: CITIFILE A.01.00
Identifies the file as a CITIfile and indicates the revision level of the file. The CITIFILE keyword and revision code must precede any other keywords.
The CITIFILE keyword at the beginning of the package assures the device reading the file that the data that follows is in the CITIfile format.The revision number allows for future extensions of the CITIfile standard.
The revision code shown here following the CITIFILE keyword indicates that the machine writing this file is using the A.01.00 version of CITIfile as defined here. Any future extensions of CITIfile will increment the revision code.

NAME

Example: NAME CAL_SET
Sets the current CITIfile package name. The package name should be a single word with no embedded spaces. Some standard package names:
RAW_DATA : Uncorrected data.
DATA: Data that has been error corrected. When only a single data array exists, it should be named DATA .
CAL_SET: Coefficients used for error correction.
CAL_KIT: Description of the standards used.
DELAY_TABLE: Delay coefficients for calibration.

VAR

Example: VAR FREQ MAG 201
Defines the name of the independent variable ( FREQ ); the format of values in a VAR_LIST_BEGIN table ( MAG ) if used; and the number of data points ( 201 ).

CONSTANT

Example: CONSTANT name value
Lets you record values that do not change when the independent variable changes.

#

Example: #NA POWER1 1.0E1
Lets you define variables specific to a particular type of device. The pound sign ( # ) tells the device reading the file that the following variable is for a particular device.
The device identifier shown here ( NA ) indicates that the information is for a network analyzer. This convention lets you define new devices without fear of conflict with keywords for previously defined devices. The device identifier can be any number of characters.

SEG_LIST_BEGIN

Indicates that a list of segments for the independent variable follows.
Segment Format: segment type start stop number of points
The current implementation supports only a signal segment. If you use more than one segment, use the VAR_LIST_BEGIN construct. CITIfile revision A.01.00 supports only the SEG (linear segment) segment type.

SEG_LIST_END

Sets the end of a list of independent variable segments.

VAR_LIST_BEGIN

Indicates that a list of the values for the independent variable (declared in the VAR statement) follows. Only the MAG format is supported in revision A.01.00.

VAR_LIST_END

Sets the end of a list of values for the independent variable.

DATA

Example: DATA S[1,1] RI
Defines the name of an array of data that will be read later in the current CITIfile package , and the format that the data will be in. Multiple arrays of data are supported by using standard array indexing as shown above. CITIfile revision A.01.00 supports only the RI (real and imaginary) format, and a maximum of two array indexes.
Commonly used array names include:
S – S parameter
E – Error Term
Voltage – Voltage
VOLTAGE_RATIO – a ratio of two voltages (A/R)

CITIfile Guidelines

The following general guidelines aid in making CITIfiles universally transportable:

Line Length. The length of a line within a CITIfile package should not exceed 80 characters. This allows instruments which may have limited RAM to define a reasonable input buffer length.

Keywords. Keywords are always at the beginning of a new line. The end of a line is as defined by the file system or transfer mechanism being used.

Unrecognized Keywords. When reading a CITIfile, unrecognized keywords should be ignored. There are two reasons for this:

  • Ignoring unknown keywords allows new keywords to be added, without affecting an older program or instrument that might not use the new keywords. The older instrument or program can still use the rest of the data in the CITIfile as it did before. Ignoring unknown keywords allows "backwards compatibility" to be maintained.
  • Keywords intended for other instruments or devices can be added to the same file without affecting the reading of the data.

Adding New Devices. Individual users are allowed to create their own device keywords through the # (user-defined device) mechanism. (Refer to the table immediately above for more information.) Individual users should not add keywords to CITIfiles without using the # notation, as this could make their files incompatible with current or future CITIfile implementations.

File Names. Some instruments or programs identify a particular type of file by characters that are added before or after the file name. Creating a file with a particular prefix or ending is not a problem. However in general an instrument or program should not require any such characters when reading a file. This allows any file, no matter what the filename, to be read into the instrument or computer. Requiring special filename prefixes and endings makes the exchange of data between different instruments and computers much more difficult.

Converting Between Disk Formats

Most current Agilent Technologies instruments use disks formatted in the Logical Interchange Format (LIF). Some instruments also use DOS-formatted disks. CITIfiles created on one file system (LIF, DOS, HFS, etc.) may be transferred to other file systems. This is useful for designers using test equipment in addition to ADS to read/write CITIfiles.

HFS

Several LIF and DOS utilities are available for HP-UX workstations. The HP-UX utilities lifcp and doscp can transfer CITIfiles to and from LIF and DOS disks. Using lifcp and doscp are similar; using lifcp is described below. Several other LIF and DOS utilities are also available. Consult the documentation for these utilities for more detailed information. Listing the contents of a LIF disk when using HP-UX would be similar to the following example:

lifls /dev/rdsk/1s0.0

The device name used will depend on how your system was configured. Copying a CITIfile named DD_FILED1 from a LIF disk to HFS would be similar to the following example:

lifcp /dev/rdsk/1s0.0: DD_FILED1 DD_FILED1

To copy a standard HFS ASCII file to a LIF disk:

lifcp DD_FILED1 /dev/rdsk/1s0.0: DD_FILED1

When used on an HFS disk, The HP-UX program RMB/UX (Rocky Mountain BASIC for HP-UX) has the ability to write a CITIfile in either as a standard HFS ASCII file, or as a LIF volume file. The LIF volume file is the default. This type of file is not directly readable when using the HP-UX operating system, and the copy commands listed above will not work correctly.

BASIC program writers are encouraged to detect when writing to an HFS disk, and to use the standard HFS format. The program examples CITIWRITE and CITIDOALL show how this can be done. However CITIfiles stored in the LIF volume format can still be transferred to LIF disks, or converted to standard HFS files. To copy a LIF volume file named DD_FILED stored on an HFS disk and move it to a LIF disk:

lifcp DD_FILED1:WS_FILE /dev/rdsk/1s0.0: DD_FILED1

To copy the LIF volume file DD_FILED1 to a standard HFS file named NEWFILE :

lifcp DD_FILED1:WS_FILE NEWFILE

DOS

Utilities are available for DOS machines that enable them to transfer files to and from a LIF formatted disk. Many of these programs are menu-driven, and are available from the following companies: Agilent, Oswego, Meadow Soft Works, and Innovative Software Systems.

CITIfile Device-Specific Definitions

CITIfile is a generic definition of a data storage format for any type of computer or instrument. However each type of device may need to define certain conventions for itself. This section describes the device-specific keywords and conventions for current implementations.

Network Analyzer (#NA) Definitions

Data Grouping. Data arrays of the same type, obtained during a single measurement operation, are stored in a single CITIfile package. For example, all error correction arrays are stored in the same CITIfile package, and all parameters acquired during an s-parameter measurement operation are stored in the same CITIfile package.

A CITIfile package is as described in the main CITIfile documentation: the CITIFILE keyword, followed by a header section, usually followed by one or more arrays of data.

Note

There are some specific problems with the current version in reading and/or writing this data format. On the Agilent EEsof web site, refer to the Release Notes in Product Documentation, and to Technical Support for more information and workarounds (http://www.agilent.com/find/eesof).

Network Analyzer Keywords. The definition of CITIfile allows for statements that are specific to a certain type of device. the following table lists the currently defined commands for the #NA (network analyzer) keyword.

Network Analyzer Keyword Commands

Statement

Explanation

#NA ARB_SEG x y p

A list segment, as entered by the user.
xx = start value
y = stop value
p = number of points.

#NA REGISTER nn

Register in instrument that the current data package was stored in.
nn = number of register.

#NA SWEEP_TIME tt

The sweep time of the analyzer.
tt = time in seconds.

#NA POWER1 pp

Power level of signal source #1.
pp = power in dBm.

#NA POWER2 pp

Power level of signal source #2.
pp = power in dBm.

#NA PARAMS aa

Bitmap of valid parameters for a calibration. Bit positions 1-8 represent the following:
Bit #1 = S11
Bit #2 = S21
Bit #3 = S12
Bit #4 = S22
Bit #5 = user1
Bit #6 = user2
Bit #7 = user3
Bit #8 = user4
A bit equal to one means that the calibration is valid for that parameter; a zero means that the calibration is not valid for that parameter. Bit #0 is the least significant bit.

NA# CAL_TYPE cc

The type of calibration used:
1 = response calibration.
2 = response and isolation calibration.
3 = one-port calibration on port 1.
4 = one-port calibration on port 2.
5 = two-port calibration (includes one-path full & TRL)

NA# POWER_SLOPE ss

Change in power versus frequency.
ss = dBm/GHz

NA# SLOPE_MODE mm

On/off flag for power slope.
mm = 0 = off
mm = 1 = on

NA# TRIM_SWEEP tt

Linearity adjustment value for swept sources.

NA# SWEEP_MODE ss

Type of sweep done to make measurement.
0 = swept
1 = stepped
2 = single-point
3 = fast CW
4 = list

NA# LOWPASS_FLAG ff

Low-pass time domain flag.
ff = 0 = low-pass time domain enabled .
ff = 1 = low-pass time domain disabled .

NA# FREQ_INFO ii

The frequency information flag.
ii = 0 = frequency information displayed on instrument screen.
ii = 1 = frequency information not displayed on instrument screen.

NA# DUPLICATES dd

Delete duplicates flag. Determines if points listed more than once should be measured more than once.
dd = 0 = points listed more than once are measured as many times as they are listed.
dd = 1 = points are measured only once.

NA# SPAN xx yy pp

The sweep parameters:
xx = start value
yy = stop value
pp = number of points

NA# IF_BW gg

The IF bandwidth setting of the receiver.
gg = IF bandwidth in Hertz.

Error Array Numbering

Current network analyzer implementations use between one and twelve error coefficient arrays to perform error correction. The CAL_TYPE keyword description in Network Analyzer (#NA) Definitions lists the currently defined calibration types. The following table defines the meanings of each coefficient array with respect to the error model used.

Network Analyzer Error Coefficient Arrays

Error Array Name

Frequency Response

Response & Isolation

All 1-Port

All 2-Port

E1

Er or Et

Ed or Ex

Ed

Edf

E2

-

Er or Et

Es

Esf

E3

-

-

Er

Erf

E4

-

-

-

Exf

E5

-

-

-

Elf

E6

-

-

-

Etf

E7

-

-

-

Edr

E8

-

-

-

Esr

E9

-

-

-

Err

E10

-

-

-

Exr

E11

-

-

-

Elr

E12

-

-

-

Etr

Disk Filename Requirements

Some instruments or programs identify a particular type of file by characters that are added before or after the file name. In general an instrument or program should not require any such characters when reading a file.

There exist CITIfile implementations which do have file naming restrictions. This section explains how to work around these restrictions.

Agilent 8510 Series CITIfile

The 8510 checks the first 3 letters of the filename to determine what is stored in the file. The file prefixes for an 8510 CITIfile are listed in the following table.

Agilent 8510 CITIfile Prefixes

File Prefix

File Contents

Notes

RD_

Raw Data

Raw (uncorrected data array(s).

DD_

Data Data

Error corrected data array(s)

FD_

Formatted Data

Corrected & formatted data array.

DM_

Display Memory

File holds one memory.

MA_

Display Memory All

Holds all memories in 8510.

CS_

Cal Set

One set of calibration data.

CA

Cal Set All

All sets of calibration data.

DT_

Delay Table

One delay table.

DD_MYDATA is an example of a file name for a file that contains one array of corrected data.

The current 8510 CITIfile implementation is unable to read files unless they have the prefixes above. It is expected that a future 8510 revision will remove this restriction.

Agilent 8700 Series CITIfile

Storing a data file from an 8700-series analyzer in CITIfile format requires that you choose the SAVE USING ASCII option.

The 8700 series of instruments check the last two characters of the filename to determine what is stored in the file. The file endings for an 8700 CITIfile are listed in the following table.

Agilent 8700 CITIfile Filenames

Last Two Chars

File Contents

Notes

Rx

Raw Data

x = 1 = channel 1.
x = 5 for channel 2.

Dx

Data Data

x = channel number.

Fx

Formatted Data

x = channel number.

Mx

Display Memory

x = channel number.

xy

Cal Set

x = channel number.
y = number of error coefficient arrays in the file. y is displayed in hexadecimal.

FILE1D1 is an example of a file name for a file that contains corrected data for channel #1. FILE1R5 is a filename for raw data arrays from channel #2. MYFILE2C is an example of a name for a file that contains a cal set used by channel #2, with 12 arrays of data (hexadecimal C).

To load data from disk into an 8700-series instrument, there must be a matching instrument state file to go with the data that is being loaded. Consult the 8700-series documentation for more information.