DOC

touchstone file format specification version 2.0 (word)

By Ann Wagner,2014-02-28 08:42
16 views 0
Though specific cases are used for the units above and throughout this specification (e.g., "kHz"), Touchstone files are case-insensitive....

Touchstone? File Format Specification Version 2.0

    Touchstone? File Format

    Specification

    Version 2.0

    Ratified by the IBIS Open Forum

    April 24, 2009

Copyright ? 2009 by TechAmerica. This specification may be distributed free of charge, as long as the

    entire specification including this copyright notice remain intact and unchanged.

Touchstone? is a registered trademark of Agilent Technologies, Inc. and is used with permission.

     Page 1

    Touchstone? File Format Specification Version 2.0 TABLE OF CONTENTS

    TABLE OF CONTENTS .......................................................................................................................... 2 INTRODUCTION .................................................................................................................................... 3 GENERAL SYNTAX RULES AND GUIDELINES ................................................................................. 4 FILE FORMAT DESCRIPTION .............................................................................................................. 5 Introduction .......................................................................................................................................... 5 Comment Lines .................................................................................................................................... 6 [Version] .............................................................................................................................................. 6 Option Line .......................................................................................................................................... 6

    Option Line Examples ....................................................................................................................... 7 [Number of Ports] ................................................................................................................................. 8 [Two-Port Data Order] .......................................................................................................................... 8 [Number of Frequencies] ...................................................................................................................... 9 [Number of Noise Frequencies]............................................................................................................. 9 [Reference] ......................................................................................................................................... 10 [Matrix Format] .................................................................................................................................. 11 [Network Data] ................................................................................................................................... 11 Single-Ended Network Parameter Data ............................................................................................... 12

    1-port and 2-port Networks ............................................................................................................. 13

    3-port and 4-port Networks ............................................................................................................. 15

    5-port and Above Networks............................................................................................................. 17 Introduction to Mixed-Mode Concepts ................................................................................................ 19 [Mixed-Mode Order] .......................................................................................................................... 20 Mixed-Mode Network Parameter Data ................................................................................................ 21 [Noise Data] ....................................................................................................................................... 23 Noise Parameter Data ......................................................................................................................... 23 [End] .................................................................................................................................................. 25 INFORMATION DESCRIPTION .......................................................................................................... 26 Introduction ........................................................................................................................................ 26 [Begin Information], [End Information] .............................................................................................. 26 Information Keywords ........................................................................................................................ 26 COMPATIBILITY NOTES .................................................................................................................... 27 APPENDIX A: Examples of Mixed-Mode Transformations .................................................................... 28 Transformations Between Conventional and Mixed-Mode Matrices for a Pair of Ports ......................... 28 S-parameters ....................................................................................................................................... 28 Y- and Z-parameters ........................................................................................................................... 28 Mutual Transformations in Cases of Several Port Pairs ........................................................................ 29

     Page 2

Touchstone? File Format Specification Version 2.0

INTRODUCTION

    A Touchstone file (also known as an SnP file) is an ASCII text file used for documenting the n-port network parameter data of an active device or passive interconnect network. While Touchstone files have been accepted as a defacto standard for the transfer of frequency dependent n-port parameters, up until this

    document no formal specification of the file format or syntax had been produced. This document, based upon information from Agilent Technologies, Inc. (the originator of Touchstone), is a formal specification of the Touchstone file format and is intended for use with documents and specifications produced by the IBIS Open Forum.

    Version 2.0 was created based upon the original Touchstone definition, with added features in the style of IBIS (I/O Buffer Information Specification) and the ICM (IBIS Interconnect Model) specification. Files written using the original syntax are compatible with the updated specification and are treated as Version 1.0.

     Page 3

    Touchstone? File Format Specification Version 2.0

    GENERAL SYNTAX RULES AND GUIDELINES

    The following are the general syntax rules and guidelines for a Touchstone file.

1. Touchstone files are case-insensitive.

2. Only US-ASCII

    a) graphic characters (i.e., code values 20h through 7Eh) ,

    b) tab characters (09h), and

    c) line termination sequences, e.g., LF (0Ah), CR+LF (0Dh + 0Ah), or CR (0Dh),

    each encoded in 8 bits as defined in ISO/IEC 8859-1:1998 are permitted in a Touchstone file.

    3. Comments are preceded by an exclamation mark (!). Comments may appear on a separate line or

    after the last data value on a line. Comments are terminated by a line termination sequence (i.e.,

    multi-line comments are not allowed).

4. Touchstone filenames have traditionally used a file extension of .snp, where n is the number of

    network ports of the device or interconnect being described. For example, a Touchstone file

    containing the network parameters for a 2-port device would be named filename.s2p, while a

    Touchstone file containing the data for a 3-port network would be filename.s3p, and so on.

    Not all operating systems may recognize filename extensions with variable contents or length as

    associated with the same type of file. To address this, the extension .s2p often has been applied to

    Touchstone files describing systems containing other than two ports. For the same reasons, the

    extension .ts is suggested for Touchstone 2.0 files.

    To preserve support of existing Touchstone files and ensure maximum compatibility across

    operating systems, the use of filename extensions other than those recommended here is permitted

    by this specification.

    For Version 2.0 and above, the [Number of Ports] keyword and argument establish the expected

    number of ports defined in the file.

5. All angles are measured in degrees.

    6. Scientific notation is allowed (e.g., 1.2345e-12). No minimum or maximum limits are placed on

    numerical precision on individual data points.

7. Keywords (as used in Version 2.0 files) shall be enclosed in square brackets, [“ and “], and shall

    start in column 1 of the line. No space or tab is allowed immediately after the opening bracket

    [ or immediately before the closing bracket ]. The keyword syntax, including spelling of

    words and placement of non-alphabetic characters, shall follow exactly what is documented in this

    specification. If used, only one space ( ) or dash (-) character separates the parts of a multi-

    word keyword.

    8. Arguments after keywords shall be separated from the closing bracket of the keyword by at least

    one whitespace character. Except where otherwise noted, this whitespace separation shall not

    include carriage return or line feed characters.

9. Blank lines are permitted.

     Page 4

Touchstone? File Format Specification Version 2.0

FILE FORMAT DESCRIPTION

    Introduction

    Touchstone data files consist of an option line followed by network parameters taken at specific

    frequencies. The option line specifies (among other things) the kind of n-port parameters the file contains

    (S-parameter, Z-parameter, etc.) and the format of the network data values (magnitude-phase, real-imaginary, etc.). Data is arranged into groups of n-port parameters preceded by the frequency at which the

    data was taken or derived. For each frequency, data for a 1-port or 2-port network is contained on a single data line while data for 3-port and above networks is arranged in a matrix row-wise order. The Touchstone format supports matrices of unlimited size.

    Version 2.0 adds to the above several additional keywords. Several of the keywords have a particular order and are placed at the beginning of the file. These are shown below.

     [Version] 2.0

     # (option line)

     [Number of Ports]

    The following keywords shall appear after [Number of Ports] and before [Network Data], but may appear in any order relative to each other.

     [Two-Port Order] (required if a 2-port system is described)

     [Number of Frequencies] (required)

     [Number of Noise Frequencies] (required if [Noise Data] defined)

     [Reference] (optional)

     [Matrix Format] (optional)

     [Mixed-Mode Order] (optional)

     [Begin Information]/[End Information] (optional)

    Touchstone 2.0 data is positioned under two required keywords in the order shown below. Network data is required and positioned after the required [Network Data] keyword. The [End] keyword marks the end of the file and is placed last.

     [Network Data]

     [Noise Data] (required only if [Number of Noise Frequencies] given)

     [End]

Network data represents either conventional n-port parameters (corresponding to what is referred to as

    single-ended port configuration) or mixed-mode parameters associated with differential port configurations. The mixed-mode parameters may be the generalized mixed-mode parameters if not all single-ended ports are combined into differential ports. A differential port is formed from two single-ended ports having the same "reference" terminal (also referred to as the "-" terminal).

    In addition to the above option lines, keywords, and network data, files that describe 2-port devices may also contain noise parameter data. Comment lines may be interspersed in the file as necessary.

    These keywords and data formats are described in detail in the following sub-sections.

     Page 5

Touchstone? File Format Specification Version 2.0

    Comment Lines

    Touchstone data files may include comments. Comments are preceded by an exclamation mark (!). Comments may appear on a separate line, or after the last data value on a line. Comments are terminated by a line termination sequence or character (i.e., multi-line comments are not allowed).

    The syntax rules for comments are identical for Version 1.0 and Version 2.0 files.

[Version]

    Rules for Version 1.0 files:

    The [Version] keyword is not permitted for Version 1.0 files.

Rules for Version 2.0 files:

    The [Version] keyword is required for files using any Version 2.0 syntax.

    Each Touchstone Version 2.0 data file shall contain one and only one [Version] keyword and argument. These shall precede all other non-comment, non-blank lines. Both the opening and closing brackets are required. The [Version] keyword is followed by one string argument. The argument shall be preceded by whitespace.

    The [Version] keyword provides information on the Version of the specification under which the file contents should be interpreted.

The only valid argument is 2.0”.

Option Line

    Each Touchstone data file shall contain an option line (additional option lines after the first one shall be ignored). The option line is formatted as follows:

# <frequency unit> <parameter> <format> R <n>

where

    # marks the beginning of the option line.

    frequency unit specifies the unit of frequency. Legal values are Hz, kHz, MHz, and GHz. The

    default value is GHz.

    parameter specifies what kind of network parameter data is contained in the file. Legal

    values are:

    S for Scattering parameters,

    Y for Admittance parameters,

    Z for Impedance parameters,

    H for Hybrid-h parameters,

    G for Hybrid-g parameters.

    The default value is S.

    format specifies the format of the network parameter data pairs. Legal values are:

    DB for decibel-angle (decibel = 20 × log|magnitude|) 10

    MA for magnitude-angle,

    RI for real-imaginary.

    Angles are given in degrees. Note that this format does not apply to noise

    parameters (refer to the Noise Parameter Data” section later in this

    specification). The default value is MA.

     Page 6

Touchstone? File Format Specification Version 2.0

R n specifies the reference resistance in ohms, where n is a real, positive number of

    ohms. The default reference resistance is 50 ohms. Note that this is overridden

    by the [Reference] keyword, described below, for files of [Version] 2.0 and

    above.

    Option line parameters are separated by one or more whitespace; the option line itself is terminated with a line termination sequence or character. If a parameter is missing, the default value is assumed. With the exception of the opening # (hash mark) symbol and the value following “R”, option line parameters may

    appear in any order.

In summary, the option line should read:

For 1-port files: # [Hz|kHz|MHz|GHz] [S|Y|Z] [DB|MA|RI] [R n]

    For 2-port files: # [Hz|kHz|MHz|GHz] [S|Y|Z|G|H] [DB|MA|RI] [R n]

    For 3-port and beyond files: # [Hz|kHz|MHz|GHz] [S|Y|Z] [DB|MA|RI] [R n]

    For mixed-mode files: # [Hz|kHz|MHz|GHz] [S|Y|Z] [DB|MA|RI] [R n]

    where the square brackets ([“, “]) indicate optional information; ...|...|...| means to select one of the choices; and n is replaced by a positive integer or floating-point number. Though specific cases are used for the units above and throughout this specification (e.g., “kHz”), Touchstone files are case-insensitive.

    The reference impedance specified in the option line applies to the network data for all ports, if [Reference] is not present.

Rules for Version 1.0 Files:

    For Version 1.0 files, the option line shall precede any data lines and shall be the first non-comment, non-blank line in the file.

    The reference resistance defines the system reference for the S-parameter data and the normalization used on G-, H-, Y-, and Z-parameter data.

Rules for Version 2.0 Files:

    For Version 2.0 files, the option line shall follow the [Version] keyword and argument and precede the [Number of Ports] keyword and argument.

    For Version 2.0 files, the reference resistance defines the system reference for the S-parameter data if the [Reference] keyword is not present. Network data for G-, H-, Y- and Z-parameters in Version 2.0 files is not normalized. Therefore, the reference resistance and [Reference] keyword have no impact on G-, H-, Y-, or Z-parameter data in Version 2.0 files. S-parameters are, by definition, normalized with respect to the reference impedance(s) and in this respect there is no difference between the treatment of S-parameters in Version 1.0 and Version 2.0 files.

    If the [Mixed-Mode Order] keyword is present, mixed-mode network parameters are used in the file. Mixed-mode parameters are only supported for S-, Y-, and Z-parameter data.

    Per the defaults above, an empty option line (a single hash mark without any non-comment characters following it) in a Version 1.0 file would indicate that the file uses GHz units for frequency, single-ended S-parameters for the network data, magnitude-angle (MA) for the network data format and 50 ohms as the reference or normalization resistance. In a Version 2.0 file, the same defaults would apply, except that no normalization would be assumed and the [Reference] keyword and argument(s) would supersede the 50 ohm reference resistance assumption.

Option Line Examples

    Minimum required option line example, using all default values:

     Page 7

Touchstone? File Format Specification Version 2.0

    #

    Frequency in GHz, S-parameters in real-imaginary format, referenced to 100 ohms: # GHz S RI R 100

    Frequency in kHz, Y-parameters in real-imaginary format, normalized to 100 ohms: # kHz Y RI R 100

    Frequency in Hz, Z-parameters in magnitude-angle format, normalized to 10 ohms: # Hz Z MA R 10

    Frequency in kHz, H-parameters in real-imaginary format normalized to 1 ohm: # kHz H RI R 1

Frequency in MHz, G-parameters in decibel format normalized to 1 ohm:

    # MHz G DB R 1

[Number of Ports]

    Rules for Version 1.0 Files:

    The [Number of Ports] keyword is not permitted in Version 1.0 files.

Rules for Version 2.0 Files:

    Each Touchstone Version 2.0 file shall contain one and only one [Number of Ports] keyword and argument. The [Number of Ports] keyword and argument define the number of single-ended ports represented by the network data in the file.

    The [Number of Ports] keyword is followed by a single positive integer argument, separated from the keyword by whitespace.

    The [Number of Ports] keyword is required for Version 2.0 files. It shall be the first keyword after the option line.

Example 1 (Version 2.0):

    ! 4-port S-parameter data

    ! Data valid for 1.0, if [Version] and [Number of Ports] are removed

    [Version] 2.0

    # GHz S MA R 50

    [Number of Ports] 4

[Two-Port Data Order]

    Rules for Version 1.0 Files:

    The [Two-Port Data Order] keyword is not permitted in Version 1.0 files.

Rules for Version 2.0 Files:

    The [Two-Port Data Order] keyword is required only when the argument for the [Number of Ports] keyword is 2. Otherwise, it is not permitted. When required, the [Two-Port Data Order] keyword and argument shall appear after the [Number of Ports] keyword and argument and before any network data. Multiple [Two-Port Data Order] keywords in the same file are not permitted.

     Page 8

Touchstone? File Format Specification Version 2.0

    The [Two-Port Data Order] keyword, in brackets as shown, is followed by one of two string arguments separated from the keyword by whitespace: 12_21 or 21_12.

    The [Two-Port Data Order] keyword is used to signify the column ordering convention. The Version 1.0 convention for 2-port network data is N11, N21, N12, N22, where N11, N12, etc., represent pairs of data entries. However, some tools and users have adopted the convention N11, N12, N21, N22 (a more natural order consistent with all the other n-port ordering conventions). The keyword makes the ordering of 2-port network data explicit and unambiguous in Version 2.0 files.

[Number of Frequencies]

    Rules for Version 1.0 Files:

    The [Number of Frequencies] keyword is not permitted in Version 1.0 files.

Rules for Version 2.0 Files:

    The [Number of Frequencies] keyword and argument specify the number of frequency points, and therefore blocks of network parameters, listed in the file.

    The [Number of Frequencies] keyword, in brackets as shown, shall be followed by an integer greater than 0.

The [Number of Frequencies] is required in Version 2.0 files.

    [Number of Frequencies] shall appear after the [Number of Ports] keyword and before any network data.

[Number of Frequencies] has no impact on noise parameters.

Example 2 (Version 2.0):

    !1-port Z-parameter file, multiple frequency points

    [Version] 2.0

    # MHz Z MA

    [Number of Ports] 1

    [Number of Frequencies] 5

[Number of Noise Frequencies]

    Rules for Version 1.0 Files:

    The [Number of Noise Frequencies] keyword is not permitted in Version 1.0 files.

Rules for Version 2.0 Files:

    The [Number of Noise Frequencies] keyword and argument specify the number of noise frequency points, and therefore blocks of noise parameters, listed in the file.

    The [Number of Noise Frequencies] keyword, in brackets as shown, shall be followed by an integer greater than 0.

    The [Number of Noise Frequencies] is required in Version 2.0 files only if noise parameter data is provided.

    [Number of Noise Frequencies] shall appear after the [Number of Ports] keyword and before any network data.

Example 3 (Version 2.0):

     Page 9

Touchstone? File Format Specification Version 2.0

    !2-port network, S-parameter and noise data

    !Default MA format, GHz frequencies, 50 ohm reference, S-parameters

    [Version] 2.0

    #

    [Number of Ports] 2

    [Two-Port Data Order] 21_12

    [Number of Frequencies] 2

    [Number of Noise Frequencies] 2

[Reference]

    Rules for Version 1.0 Files:

    The [Reference] keyword is not permitted in Version 1.0 files.

Rules for Version 2.0 Files:

    The [Reference] keyword and associated argument(s) provide a per-port definition of the reference environment used for the S-parameter measurements in the network data. They shall appear only once in the file.

    The [Reference] keyword, in brackets as shown, shall be followed by one or more positive integer or floating-point numbers as arguments, separated from the keyword and each other by whitespace. [Reference] arguments shall not be mixed with arguments for any other keyword in the file. [Reference] and its arguments may span multiple lines.

    Each of the arguments is a real-valued impedance (i.e., a resistance) and is assumed to be ordered per port numerically starting at 1 and ending with the value listed under [Number of Ports] (e.g., if [Number of Ports] contains the value “5”, five arguments are expected under [Reference], ordered starting with port 1’s impedance and ending with port 5’s impedance. The [Reference] keyword arguments assume and refer to

    single-ended ports.

The units of the [Reference] argument impedances are ohms.

    [Reference] shall only appear after the [Number of Ports] keyword and before any network data.

Note that complex and imaginary impedance values are not supported.

    [Reference] is optional. If [Reference] is not present, the reference impedances for the S-parameter data are assumed to be defined by the option line. If [Reference] is present, it shall contain an impedance argument for every port represented in the data (for example, a 4-port data file using [Reference] shall contain four [Reference] impedance arguments).

The [Reference] keyword has no impact on G-, H-, Y-, or Z-parameter data.

    [Reference] arguments may begin on the line following the closing bracket of the keyword (in other words, after a line termination character or sequence).

Example 4 (Version 2.0):

    ! 4-port S-parameter data

    ! Default impedance is overridden by [Reference]

    ! Data cannot be represented using 1.0 syntax

    ! Note that the [Reference] keyword arguments appear on a separate line

    [Version] 2.0

    # GHz S MA R 50

    [Number of Ports] 4

     Page 10

Report this document

For any questions or suggestions please email
cust-service@docsford.com