FAQ: Touchstone (.s2p/.sNp) files — the option line, data order, reference impedance and five common ways they get misread

Started by LunaWei · 2026-10-22 01:44 UTC · 2 views · 1 replies
L Admin
[FAQ, rfforum Editorial Team]

Touchstone files are how S-parameters move between VNAs, EM solvers, circuit simulators and vendors. The format is simple, but a few details cause real errors. Here are the questions we see most often.

Q1. What does the option line mean?
The line starting with # sets units and format, for example:
# GHz S MA R 50
- Frequency unit: Hz, kHz, MHz or GHz.
- Parameter: S, Y, Z, H or G.
- Format: DB (dB/angle), MA (magnitude/angle) or RI (real/imaginary). Angles are in degrees.
- R: the reference impedance, here 50 ohm.
If the line is missing, the defaults are GHz, S, MA, R 50. Lines starting with ! are comments.

Q2. What order are the numbers in?
For a 2-port file each frequency line is: freq S11 S21 S12 S22. Note that S21 comes before S12. This is the exception: for 3 ports and above, the data are written row by row: S11 S12 S13, then S21 S22 S23, and so on, with larger files wrapping onto several lines. Touchstone version 2.0 adds keywords such as [Version] and [Two-Port Data Order] to make the order explicit.

Q3. Five common misreadings
1. S12 and S21 swapped by a home-made parser that assumes row order for a 2-port file. A passive part still looks fine, but an amplifier suddenly has reverse gain.
2. DB read as MA, or the reverse. A "magnitude" of −0.5 is a dead giveaway.
3. Reference impedance not 50 ohm. Some files use 75 ohm, 100 ohm, or per-port impedances (Touchstone 2.0). Importing them as 50 ohm data changes every result.
4. Noise data treated as S-data. In a 2-port file, noise parameters can follow the S-parameters; the noise block starts where the frequency value drops back below the previous line. Old parsers sometimes read it as extra S-parameter points.
5. Extrapolation. Circuit simulators silently extrapolate below the first and above the last frequency. Time-domain analysis needs data down to near DC with uniform spacing; a file starting at 10 MHz will give misleading TDR or transient results.

Q4. How do I sanity-check a file before trusting it?
Plot |S21| and |S11| in dB, check that a passive network has |S11|² + |S21|² ≤ 1 at every frequency (passivity), and check causality if you plan time-domain work. Our earlier article on this is at https://www.rfforum.com/t/40.

Q5. Can I cascade vendor files directly?
Yes, if both use the same reference impedance and the reference planes are where you think they are. Vendor data are usually measured on the vendor's own fixture, so the pads and launch on your board are not included.

Readers: which Touchstone problem has cost you the most time? Add yours below and we will extend this FAQ.

— rfforum 编辑部 / Editorial Team
L Admin
Editorial addendum: one more pitfall we left out of the main list is frequency-point spacing.

Many VNA exports use a linear sweep with a few hundred points, which is fine for frequency-domain plots. For a time-domain transform or a transient simulation, though, the maximum unambiguous time is 1/Δf. With 401 points over 10 MHz–20 GHz, Δf ≈ 50 MHz, so the time window is only about 20 ns. A reflection or a long cable that arrives later aliases back into the window and shows up as a false discontinuity. If you know the file will be used in time domain, choose the number of points so that 1/Δf comfortably exceeds the electrical length of the whole fixture and cables.

Open question for readers: which tools do you use to check passivity and causality of a Touchstone file before handing it to a colleague?

— rfforum 编辑部 / Editorial Team
广告 AdNXP Airfast 5G 基础设施射频功率多芯片模块示意图NXP Semiconductors射频功率、汽车雷达与连接芯片 · RF power, radar and connectivity访问官网 →免费展示 · 资料来自公开信息 · 如需撤下请联系 ads@rfforum.com
广告 Ad广告位招商 / Advertise hereads@rfforum.com · 刊例 Rate cardT2 · 728×90
Log in or register to reply.