Electronic Design Automation

Data File Formats

/DAY-tuh fyl FOR-mats/
Standardized text and binary structures used to store and exchange frequency-dependent network data between measurement instruments and EDA software. The dominant family is Touchstone (file extensions .s1p through .s99p), which captures complex S-parameters in magnitude-angle, decibel-angle, or real-imaginary notation against a stated reference impedance. Richer alternatives such as CITIfile and MDIF (Measurement Data Interchange Format) carry multiple sweeps, parameter-swept device libraries, noise data, and complex port impedances that plain Touchstone cannot represent. Whether the data originates from a vector network analyzer or a circuit simulator, a consistent file format lets a Touchstone .s2p exported in St. Petersburg drop directly into a harmonic-balance simulation without manual re-keying.
Category: Electronic Design Automation
Primary format: Touchstone .sNp
Default Zref: 50 Ω

Anatomy of an S-Parameter File

The Touchstone format, originally defined by EEsof and later revised as Touchstone 2.0 (ratified by the IBIS Open Forum in 2009, with a 2.1 clarification in 2024), is the lingua franca of RF data interchange. A file is plain ASCII with three logical parts: optional comment lines that begin with an exclamation mark, a single option line that begins with a hash sign, and the network-data block. The option line declares four things in a fixed order: the frequency unit (Hz, kHz, MHz, or GHz), the parameter type (S, Y, Z, H, or G), the data notation (MA, DB, or RI), and the reference impedance preceded by the letter R. A header reading # GHz S MA R 50 therefore means S-parameters in linear magnitude and degrees, swept in gigahertz, referenced to 50 Ω.

Each subsequent row begins with a frequency point followed by the S-parameter values for that point. The number of complex pairs equals the square of the port count, so a two-port file lists S11, S21, S12, S22 in that specific column order, while a four-port file lists sixteen pairs. This ordering is a frequent source of error: Touchstone 1.x lists S21 before S12 for two-port files but uses row-major order (S11, S12, S13 then S21, S22 and so on) for files of three or more ports, a historical inconsistency that Touchstone 2.0 resolved with explicit keywords and a mandatory port-order block.

When a single Touchstone file is not enough, engineers reach for CITIfile or MDIF. CITIfile (Common Instrumentation Transfer and Interchange File) stores multiple independent data arrays, each with its own independent variable, so a single file can hold an S-parameter sweep alongside the noise figure and source-pull contours it was measured with. MDIF wraps many parameter-indexed sub-files into one library, which is how foundries deliver bias-dependent or geometry-swept transistor models to a simulator.

The Option Line and Data Notation

Touchstone option line syntax:
# [freq-unit] [param] [notation] R [Zref]  →  e.g. # GHz S RI R 50

Complex pairs per frequency point:
Npairs = Nports2  (2-port → 4, 4-port → 16)

DB notation to linear magnitude / angle:
|Sij| = 10(dB / 20),  θ = angle in degrees

Magnitude-angle to real / imaginary:
Re = |S| × cosθ,  Im = |S| × sinθ  (θ in radians)

Reverse: |S| = √(Re2 + Im2), θ = arctan(Im / Re). If R is omitted, Zref defaults to 50 Ω.

Format Comparison

FormatExtensionEncodingMultiple sweepsComplex ZrefTypical use
Touchstone 1.x.s1p to .s99pASCIINoNoVNA export, passive components
Touchstone 2.0.tsASCIINoYes (per-port)Multi-port, mixed-mode data
CITIfile.cti / .citiASCIIYesYesNoise, load-pull, multi-array
MDIF.mdfASCIIYes (indexed)YesSwept transistor model libraries
P2D / S2D.p2d / .s2dASCIIYes (power-swept)YesLarge-signal amplifier models (ADS)
Common Questions

Frequently Asked Questions

What does the N in a Touchstone .sNp file extension mean?

N is the port count, which sets the number of S-parameter columns: a .s1p holds one S11 value per frequency, a .s2p holds four (S11, S21, S12, S22), and a .s4p holds sixteen. Each frequency point carries N2 complex pairs. Touchstone 1.x wraps files of three or more ports across multiple lines; Touchstone 2.0 fixed that with explicit [Number of Ports] and [Network Data] keywords.

How do I convert a Touchstone file between magnitude-angle and real-imaginary format?

The notation token on the option line selects MA (linear magnitude, degrees), DB (decibels, degrees), or RI (real, imaginary). From DB, recover linear magnitude as 10(dB/20), then Re = |S| × cosθ and Im = |S| × sinθ. Reverse with |S| = √(Re2 + Im2) and θ = arctan(Im / Re). Tools such as scikit-rf read all three and convert internally, so the choice is mainly about readability.

Why does my S-parameter file have the wrong reference impedance?

Zref is set by the trailing R value, as in # GHz S MA R 50. If R is missing the default is 50 Ω, which corrupts data that was actually 75 Ω or complex. Because S-parameters are defined relative to a specific reference impedance, re-normalizing requires the full impedance-renormalization transform, not simple scaling. CITIfile and MDIF carry explicit per-port impedance metadata, which is why they suit transistor and on-wafer data.

Measured Data You Can Trust

Get Touchstone Files With Every Component

RF Essentials ships measured Touchstone .sNp data with our millimeter-wave waveguide components and integrated assemblies, ready to drop into your simulator. Contact our engineers for characterization details.

Get in Touch