Back to Blog
RF

From Datasheet to Smith Chart: Importing Touchstone S-Parameters

11 min read
NevilLabs RF Analysis tab showing a Smith chart with an imported S11 locus running from a green start marker to a red end marker, and a readout bar listing frequency, reflection magnitude, VSWR, return loss and impedance

Every RF datasheet I've read has the same shape: typical gain and return loss at a handful of frequencies, a couple of tidy curves and, near the bottom of the product page, a link to an S-parameter file. Most people design from the table. The rest drop the file into a simulator and trust whatever curve comes out (I did this for years, so no judgement here).

The file is more honest than the datasheet, because it holds every point that was measured, not just the flattering ones. It is also terse. One option line sets the units and reference impedance, an old column-order convention decides which number is gain, and the calibration behind the numbers isn't in the numbers at all. Here is how to read one properly, with the Touchstone importer and Smith chart in NevilLabs as the worked example.

What You Will Learn

  • What an S-parameter measures: waves going into and out of each port, defined against a stated reference impedance
  • How to read a Touchstone option line such as # GHz S MA R 50, and what the specification assumes when it is missing
  • Why a version 1 .s2p file lists S21 before S12, and how version 2.0 made the order explicit
  • How an S11 trace on a Smith chart turns into impedance, return loss and VSWR at each frequency
  • What cascading two .s2p files through ABCD matrices captures that adding S21 in decibels does not
  • Why calibration, the reference plane and fixture de-embedding decide whether a file deserves your trust

S-Parameters Are Waves, Measured Against an Impedance

At a few gigahertz you can't measure port voltage and current cleanly (the probe joins the circuit, and the open or short terminations that low-frequency methods rely on can make an active device oscillate), so we describe networks by waves (Keysight's Application Note 1287-1 covers the measurement side). Each port has an incoming wave, a, and an outgoing wave, b, related by b = S·a. S11 is what comes back out of port 1 with every other port terminated in the reference impedance; S21 is what arrives at port 2, which is why it reads as gain or insertion loss.

The part people skip: those waves are defined against a reference impedance (Kurokawa's 1965 paper on power waves sets out the general case, and Pozar's Microwave Engineering is where most of us first met it). An S11 of 0.1 means "0.1 relative to 50 Ω". Measure the same part in a 75 Ω system and every number changes, even though the part hasn't. That's why every Touchstone file carries its reference impedance.

What Is Actually Inside a Touchstone File

The specification credits Agilent Technologies as the originator of Touchstone, which was a de facto standard well before it had a formal definition. The IBIS Open Forum wrote one, first as revision 1.1 and then as version 2.0 (ratified in April 2009) and version 2.1 (January 2024). Files in the original syntax are still valid and are treated as version 1.0.

A version 1 file is plain text with three kinds of line. Comment lines begin with an exclamation mark, one option line begins with a hash, and everything else is data. The top of a two-port file looks like this (the numbers are illustrative):

  • Comment lines: part number, bias, date and, in a careful file, the calibration applied
  • The option line: # GHz S MA R 50
  • A data line: 2.40 0.21 -48.0 8.90 112.0 0.03 21.0 0.18 -61.0, one frequency followed by four pairs
Annotated diagram of a two-port Touchstone file: comment lines at the top, an option line reading GHz S MA R 50 with each field labelled, and one data line split into a frequency column followed by magnitude and angle pairs labelled S11, S21, S12 and S22
Anatomy of a version 1 .s2p file. Note the pair order on each data line: S11, S21, S12, S22.

The Option Line

The option line has up to four fields, in any order: the frequency unit (Hz, kHz, MHz or GHz), the parameter type (S, Y, Z, H or G), the number format, and R followed by the reference resistance in ohms. MA is linear magnitude and angle, DB is decibels and angle, and RI is real and imaginary parts, with angles in degrees. So # GHz S MA R 50 means gigahertz, S-parameters, magnitude and angle, 50 Ω.

With no option line, the specification says to assume GHz, S, MA and 50 Ω, which is a polite way of saying the file will be read as something, right or not. The NevilLabs parser reads the fields in any order and case, takes the reference impedance from R, and applies those defaults when the line is missing. The import summary shows the impedance it used, so check that first.

.s1p, .s2p and the Column-Order Quirk

The extension carries the port count. An .s1p file (an antenna, a termination) has a frequency and one pair per line; an .s2p file has a frequency and four pairs, nine numbers in all. For three and four ports, version 1 writes one matrix row per line.

Two-port files are the odd one out: version 1 orders them S11, S21, S12, S22, column by column rather than row by row. The version 2.0 specification notes that some tools adopted S11, S12, S21, S22 instead, and added a [Two-Port Data Order] keyword (12_21 or 21_12) to make the choice explicit. For a passive, reciprocal part a swap is invisible, since S21 equals S12. For an amplifier, where gain and reverse isolation can be tens of decibels apart, a swapped pair turns the amplifier round.

The NevilLabs importer reads this version 1 layout: two-port data in S11, S21, S12, S22 order, three or more ports row by row (a frequency may span several lines), with the port count taken from the .sNp extension when the data fits it. A file sorted high to low is flipped to ascending, and an empty file, a non-numeric value or an incomplete frequency block gets a plain error message instead of a half-loaded chart.

Importing a File into NevilLabs

In the electronics workspace, the RF Analysis tab of the bottom panel has three views (Smith Chart, S-Parameters and Chain Budget) and an Import .s2p button. The dialog takes .s1p to .s4p and .snp files, by click or drag. The file is parsed in your browser (no server round trip just to read it) and the parsed data is saved with the project, so the same file is waiting when you come back. A successful import shows the port count, frequency points and reference impedance, then switches to the Smith chart.

NevilLabs Import Touchstone (S-parameters) dialog with a dashed drop area for .s1p, .s2p and .snp files and a green confirmation box showing the file name, 2-port, the number of frequency points and a 50 ohm reference impedance
The import dialog. The summary line (ports, frequency points, reference impedance) is the quickest check that the option line was read the way you expected.

The screenshots in this post use the S-parameters Analog Devices publishes for the ADL9005, a wideband GaAs low noise amplifier, the 85 °C file, imported as-is. NevilLabs imports standard Touchstone S-parameter files from any manufacturer (.s1p to .s4p and .snp), so the same steps work with the file for your own part.

Reading S11 on a Smith Chart

Phillip Smith, then at Bell Telephone Laboratories, published his chart in the January 1939 issue of Electronics as a transmission line calculator. It is the reflection-coefficient plane with normalised impedance drawn over it, using z = (1 + Γ) / (1 − Γ). The centre is a perfect match, the right edge an open circuit, the left edge a short; the upper half is inductive, the lower half capacitive, and the outer circle is total reflection.

Sweep S11 and you get a locus, one point per frequency. Distance from the centre is |Γ|, which gives return loss (−20 log10 |Γ|) and VSWR ((1 + |Γ|) / (1 − |Γ|)); position on the grid gives impedance. Circles around the centre are constant VSWR, so "inside the 2:1 circle across the band" (|Γ| below one third, roughly 9.5 dB return loss) is a spec you can check by eye. For what component tolerances do to that same locus, see our post on reading a Smith chart before you fabricate.

The NevilLabs Smith chart draws constant-resistance circles and constant-reactance arcs, shows S11 by default, and lets you toggle any other S-parameter in the file. Each frequency point is a dot, the first green and the last red, so the sweep direction is obvious. Hover near a trace and the readout snaps to the closest point: frequency, |Γ|, VSWR, return loss and impedance as R ± jX, referenced to that port's impedance. S21 can be drawn on the same plane too, but a transmission coefficient has no impedance, whatever the grid underneath suggests.

NevilLabs Smith chart with constant-resistance circles and constant-reactance arcs, an S11 locus of dots curving from a green start point near the centre to a red end point, a crosshair marker on one point and a readout bar below it
An imported S11 locus. Green marks the lowest frequency, red the highest, and the readout follows the cursor.

Why the Trace Rotates: Reference Planes

Move the reference plane along a matched, lossless line and the whole S11 locus rotates around the centre by twice the electrical length of the extra line (clockwise, towards the generator), with |Γ| unchanged (Pozar, again). Electrical length grows with frequency, so a few millimetres of connector barely matter at 100 MHz and turn a neat cluster into a spiral at 20 GHz. The phase of S11 means nothing until you know where the reference plane is.

The S-Parameters view plots the same data against frequency (magnitude in decibels, phase with an unwrap option, VSWR or impedance), with PNG and CSV export. It also runs a quiet sanity check: where a port's |Sii| reaches 1 or more, the VSWR and impedance views mark it as non-physical for a passive network and leave gaps. On a filter that usually means a calibration problem. On an amplifier it can be real, and it's a stability warning, not a plotting glitch.

Cascading Two Files

Real systems are chains, say a filter feeding an amplifier, each with its own .s2p file. Adding their S21 values in decibels only works if every interface is perfectly matched, because the reflections bouncing between stages are exactly what the addition throws away. The textbook route is to convert each two-port to its ABCD (chain) matrix, multiply in signal order and convert back to S-parameters (Pozar tabulates the conversions), and the mismatch between stages comes along with no extra work.

In NevilLabs, place one S-Parameter Block per file, import each block's .s2p in the Properties panel, wire the blocks in series between two RF Ports and press Cascade S-Params. The tool traces the wiring from the lower-numbered port, flips any block wired backwards, multiplies the ABCD matrices and loads the result like an imported file, so every readout above works on it.

Three things to keep in mind. ABCD matrices describe two-ports, so each block is a two-port, and all blocks share one reference impedance (NevilLabs reports a mismatch rather than converting silently). A block with zero transmission has no chain matrix, which is a property of the maths. And blocks are placed onto the first block's frequencies by linear interpolation with end values held, so check that the frequency ranges overlap: outside the overlap the curve is held flat, not measured.

Calibration and De-embedding: Trusting a Touchstone File

Nothing in a Touchstone file says whether the numbers are right. A vector network analyser's raw ratios include its own systematic errors (directivity, source and load match, tracking), and calibration against known standards (short, open, load and thru in the common SOLT scheme) removes them and fixes the reference plane where the standards were connected (Rumiantsev and Ridler review the methods in IEEE Microwave Magazine). A careful file records this: a sample Keysight E8362B (PNA) header in Keysight's documentation lists a Full 2 Port SOLT correction against each parameter. No such line, and you don't know where the reference plane is.

Most parts can't plug into a coaxial connector, so they're measured on a fixture that is then removed mathematically by de-embedding (Keysight's note on de-embedding and embedding S-parameter networks covers the maths). Coilcraft's application note is refreshingly direct about the consequence: adding your board's parasitics back onto de-embedded data needs care, and if you want S-parameters that match your circuit, you measure them in your circuit. A de-embedded file describes the part floating in space; your pads, vias and trace aren't in it, and what that copper does is a field problem (our post on 3D field simulation shows why).

Then there are the smaller traps:

  • Bias and temperature: an amplifier's file is valid at the supply voltage and current in its header, and nowhere else.
  • Reference impedance: cable television runs at 75 Ω, as MACOM's note on the S2P format points out, so a 50 Ω file in that chain is the wrong file.
  • Point spacing: interpolating between widely spaced points on a fast-rotating trace cuts straight across the chart instead of following the curve.
  • Linearity and noise: S-parameters are small-signal and linear. Compression needs a different analysis, and noise needs the separate noise-parameter block some two-port files append.

Import a sloppy measurement and you get a confident-looking, wrong chart. The header, the Smith chart and your own judgement are what warn you.

A Touchstone file is a measurement with the paperwork removed. Read the comments before you read the chart.

Where Touchstone Files Come From in Real Work

  • Amplifier and LNA design: S-parameters at a stated bias drive matching and stability checks, which is why amplifier makers publish .s2p files (Pozar, Microwave Engineering; MACOM, Application Note AN3009). Keysight PathWave ADS reads the same S2P format, so an analyser's export can go straight into a circuit simulation.
  • Passive component modelling: inductor makers publish fixture-de-embedded S-parameters for simulation above the roughly 3 GHz reach of impedance analysers (Coilcraft, Document 1721).
  • Signal integrity: Touchstone describes passive interconnect too, and version 2.0 added mixed-mode data for differential ports and per-port reference impedances (IBIS Open Forum, Touchstone File Format Specification).
  • Test and measurement: calibration and de-embedding fix the reference plane before the file is written (Rumiantsev and Ridler, IEEE Microwave Magazine; Keysight, De-embedding and Embedding S-Parameter Networks). Keysight PNA network analysers save S-parameter measurements as Touchstone .sNp files (a sample E8362B header records the calibration applied to each parameter), and the low-cost handheld NanoVNA exports them through its companion program NanoVNASaver.
  • Automated RF analysis: scikit-rf reads Touchstone files into network objects that Python scripts can cascade, de-embed and calibrate (Arsenovic et al., IEEE Microwave Magazine). scikit-rf loads a Touchstone file into a Network object, cascades two-ports with the ** operator and de-embeds with a network's inverse.
  • NevilLabs imports Touchstone S-parameter files (.s1p to .s4p and .snp; MA, DB or RI) in the browser with nothing to install, draws them on a Smith chart with a cursor readout of |Γ|, VSWR, return loss and impedance, plots magnitude, phase, VSWR and impedance with PNG and CSV export, and cascades S-Parameter Blocks through ABCD matrices.

Read the Header, Then the Chart

If you take one habit from this, make it reading the top of the file before the data: units, reference impedance, bias, calibration and reference plane. Then import it, check the summary matches what the header promised, and look at S11 on the Smith chart before anything else. A passive part whose locus pokes outside the unit circle, or spirals where it shouldn't, is telling you about the measurement rather than the part.

NevilLabs is opening access in small batches. If you have a drawer full of .s2p files (most RF engineers I know do), join the waitlist, bring the one you are most curious about, and let's see what its Smith chart says. Keep learning to read what your measurements are telling you, and keep building the RF hardware you can imagine.

References

  1. IBIS Open Forum. (2009). Touchstone File Format Specification, Version 2.0. — https://ibis.org/touchstone_ver2.0/touchstone_ver2_0.pdf (opens in a new tab)
  2. IBIS Open Forum. (2024). Touchstone File Format Specification, Version 2.1. — https://ibis.org/touchstone_ver2.1/touchstone_ver2_1.pdf (opens in a new tab)
  3. Pozar, D. M. (2011). Microwave Engineering (4th ed.). John Wiley & Sons.
  4. Kurokawa, K. (1965). Power Waves and the Scattering Matrix. IEEE Transactions on Microwave Theory and Techniques, 13(2), 194–202. doi: 10.1109/TMTT.1965.1125964 (opens in a new tab)
  5. Smith, P. H. (1939). Transmission Line Calculator. Electronics, 12(1), 29–31. McGraw-Hill. — https://www.worldradiohistory.com/Archive-Electronics/30s/Electronics-1939-01.pdf (opens in a new tab)
  6. Rumiantsev, A., & Ridler, N. (2008). VNA Calibration. IEEE Microwave Magazine, 9(3), 86–99. doi: 10.1109/MMM.2008.919925 (opens in a new tab)
  7. Keysight Technologies. Understanding the Fundamental Principles of Vector Network Analysis (Application Note 1287-1). — https://www.keysight.com/us/en/assets/7018-06841/application-notes/5965-7707.pdf (opens in a new tab)
  8. Keysight Technologies. De-embedding and Embedding S-Parameter Networks Using a Vector Network Analyzer (Application Note 5980-2784EN). — https://www.keysight.com/us/en/assets/7018-06806/application-notes/5980-2784.pdf (opens in a new tab)
  9. Keysight Technologies. S2P File Format (PD1000A documentation). — https://helpfiles.keysight.com/sp/PD1000A/Content/Exporting%20Data%20to%20PEMG/S2P%20File%20Format.htm (opens in a new tab)
  10. MACOM Technology Solutions. S-Parameter S2P File Format (Application Note AN3009). — https://cdn.macom.com/applicationnotes/AN3009.pdf (opens in a new tab)
  11. Coilcraft. (2023). S-parameters for High-frequency Circuit Simulations (Document 1721-1). — https://www.coilcraft.com/getmedia/35dbfd16-8483-4ef7-bb07-9b28a04f6dcc/doc1721_When-to-Use-S-parameters.pdf (opens in a new tab)
  12. Analog Devices. ADL9005 product page and S-parameter data. — https://www.analog.com/en/products/adl9005.html (opens in a new tab)
  13. Arsenovic, A., Hillairet, J., Anderson, J., Forsten, H., Ries, V., Eller, M., Sauber, N., Weikle, R., Barnhart, W., & Forstmayr, F. (2022). scikit-rf: An Open Source Python Package for Microwave Network Creation, Analysis, and Calibration. IEEE Microwave Magazine, 23(1), 98–105. doi: 10.1109/MMM.2021.3117139 (opens in a new tab)
  14. scikit-rf. Introduction (documentation). — https://scikit-rf.readthedocs.io/en/latest/tutorials/Introduction.html (opens in a new tab)
  15. NanoVNA. About NanoVNA. — https://nanovna.com/ (opens in a new tab)
  16. NanoVNA. NanoVNASaver. — https://nanovna.com/?page_id=90 (opens in a new tab)

Start your first build with NevilLabs

Design a circuit, run the simulation, and see the physics behind it — in your browser. We're inviting early users in small batches.

Join the Waitlist

More articles

Education
Explore Your Potential with Experiential Learning: A Comprehensive Guide to STEM Education
Inspiration
Sir M. Visvesvaraya: Explorer, Creator, Scholar
Inspiration
C.V. Raman: The Light That Changed Physics
Wireless
Guglielmo Marconi: The Engineer Who Shrank the Planet
Technology
Inside a Quadcopter: The Engineering That Keeps Drones in the Air
Physics
Newton's Laws of Motion: A Visual Guide to Forces, Inertia, and Action-Reaction
Education
Why Virtual Labs Are Rewriting the Economics of STEM Education
Simulation
Multi-Domain Simulation: Why Splitting Analog and Digital Tools Is a Mistake
RF
RF Simulation and Yield Analysis: Reading a Smith Chart Before You Fabricate
Electronics
VirtuBuild Space: Taking One Circuit From Breadboard to PCB Without Leaving the Browser
AI Design
Prompt-to-3D-Structure: What AI-Generated Geometry Is Actually Good For
Design
One Design, Three Views: Why Layout, 2D, and 3D Shouldn't Be Separate Files
Robotics
Mechatronics Simulation: Where Circuits Stop Being Circuits and Become Machines
AI
What an AI Debugging Assistant Can (and Can't) See in Your Circuit
Learning
Adaptive Learning Paths: Why 'Personalised Pace' Only Works If the Physics Is Real
Safety
What 'Child Safety' Actually Means in a STEM Simulation Platform
Visualization
Visualizing the Invisible: What 3D Field Simulation Actually Shows You
Education
What a STEM Lab Actually Costs: A Budget Framework for Administrators
Electronics
Inside the 555 Timer: Build One, Then Make an LED Flash
Electronics
Reading a Bode Plot for the First Time (an RC Filter Walkthrough)
RF
FEM vs FDTD: Choosing a 3D Solver for a Patch Antenna
PCB
Gerber and Excellon Files: What Your PCB Fab Actually Receives
Materials
Material Science You Can Test: Interactive 3D Experiments
Electronics
Resistor E-Series Explained: What E12, E24 and E96 Mean
RF
RF Cascade Analysis: Gain, Noise Figure, IIP3 and P1dB Through a Chain
Simulation
Spice Simulation Online: What .tran and .ac Results Actually Tell You
Materials
The Stress-Strain Curve: Tensile, Compressive and Shear, Explained