Advertisement

SNP Format

Click here to go to our main page on S-parameters

SNP refers to S-parameters for N-port networks.  Long ago, a company called eeSOF came up with a standardized way to express S-parameters in a text file which is often referred to as a Touchstone® file.  Keysight is now the copyright holder of the word Touchstone, when it is used in this context.  They inherited it from Agilent, who inherited it from Hewlett Packard, who bought eeSOF way back in the 1990s. If you call the data an SNP file you don't have to worry about the Touchstone copyright, right?

SNP format predates Microsoft Excel. SNP remains a microwave industry standard, even though IEEE MTT-S never created a specification for it. There is an SNP standards document, published by Tech America which is now part of CompTIA. CompTIA does not offer it on their web site, but IBIS Open Forum does. According to the document it can be freely distributed so long as the entire specification including copyright notice remain intact and unchanged, so we offer it below:

Download Touchstone® File Format Specification Version 2.0 Ratified by the IBIS Open Forum April 24, 2009

File extensions and other file types

In most modern EDA  software, your data file does not always have to have the correct extension, it could be .txt for example, but most engineers use .S2P for two-port data, .S3P for three-port, etc.  The file needs to be in text format and can be edited with Microsoft Notepad.

Forget about Excel .xlsx files, they won't work in EDA software. Comma separated values (.csv) probably won't work either, Word files?  No way, Jose. Stick with SNP files! 

S-parameter data order in an SNP file

Important update July 2017: Jon brought to our attention that for a two-port file, the order we previously suggested for the data was wrong (but is now correct). Terry helped us with an explanation of a seemingly inconsistent presentation of data from an historical perspective.  Read on....

S1P is for a one-port network (three columns of data, frequency, and two columns representing vector S11). It is hard to mess that up!

S2P is for two-port data (nine columns of data, first is frequency, then S11, S21  S12 and S22 in some type of vector format). When looking at active devices it is very important to get S21 in the right columns, just as it is equally unimportant to get it right in passive, reciprocal networks. (S12 and S21 are equal in passive reciprocal networks).

Note that if you inserted a carriage return between S21 and S12 in an S2P file,  the file would no longer be recognized, but you will notice an interesting inconsistency. In magnitude and angle format, the data would look like:

Freq S11m S11a S21m S21a

       S12m S12a S22m S22a

Which is the opposite of what a matrix should look like (S21 and S12 are not in their correct row-column places for an m x n matrix, see Wikipedia). S2P is unique in that it's the only one that doesn't follow row-column order. More on this later...

Three-port S3P files need 19 columns of magnitude and angle data. The data must be wrapped onto three lines:

Freq S11m S11a S12m S12a S13m S13a

       S21m S21a S22m S22a S23m S23a

       S31m S31a S32m S32a S33m S33a

Note that S3P (and all higher port data files) appear exactly as they do in an m x n matrix.  Be sure to put carriage returns at the end of each line!

S4P would look like:

Freq S11m S11a S12m S12a S13m S13a S14m S14a

       S21m S21a S22m S22a S23m S23a S24m S24a

       S31m S31a S32m S32a S33m S33a S34m S34a

       S41m S41a S42m S42a S43m S43a S44m S44a

Again, a correct representation of an m x n matrix.  Be sure to put carriage returns at the end of each line!

What happens with a five port file? It looks like:

Freq S11m S11a S12m S12a S13m S13a S14m S14a

       S15m S15a

       S21m S21a S22m S22a S23m S23a S24m S24a

       S25m S25A

       S31m S31a S32m S32a S33m S33a S34m S34a

       S35m s35a

       S41m S41a S42m S42a S43m S43a S44m S44a

       S45m S45A

       S51m S51a S52m S52a S53m S53a S54m S54a

       S55m S55A

What's going on?  SNP format does not allow more than four parameters per line (excluding frequency).  If you design a 96-element feed network, the format will become downright confusing, but row-column order is still preserved.

Why the disparity between the data order in S2P versus higher order data files S3P, S4P, etc? 

S-parameter files began to show up much more frequently with the advent of CAD tools for microwave and Touchstone files began to dominate the transfer of measurement data.  Two-port networks are arguably the most interesting data in active network designs (and in the 1970s, "Compact" software could only deal with two ports). From a user point of view, for a two-port network it makes a lot of sense to order all the parameters of a measurement by frequency, and having them all on one line starting with the frequency also makes sense when you consider that nine columns of data are easily printable on 8" x 11" paper (or the equivalent European size). The output of a day's work might be a thick printout, in the days where data was entered on a line printer and not a display screen. Why waste more paper than necessary?

Most of the time we are interested in S21 because it represents gain in an active device– so column order was used, putting S21 in front of boring and often much smaller S12.

11 21 12 22 is a natural order, if you concede that the user is reading in column order.

Perhaps purists would choose the 11 12 21 22 because of its consistency with the pretty much universal multiple port ordering of the parameters. However, purists would soon learn that the EDA industry does not care about purism, and such deep thinking leads to troubles that are easily avoidable by going with tradition. Tradition and usage probably will continue to dominate and this is a footnote to history.

(Thanks to Jon for asking the question, and thanks to the Other Editor for timely explanations)

Comment lines

All non-data lines must commented out by preceding the line with an exclamation point (!). For example, if you wanted to remind yourself the order of the S-parameters in a 2-port file, you might insert:

! Freq S11M S11A S21M S21A S12M S12A S22M S22A

above the actual data. There is no limit to how many lines of comments you can have.

Lines that need to be commented out may or may not include lines that have nothing but a space or carriage return. Not all EDA software treats this stuff the same....

That line with the # sign...

Before the S-parameter data there is a line that starts with #. This line tells the reader what the system impedance is, and offers four formats for the S-parameters. RI is real/imaginary, MA is magnitude/angle, and DB is magnitude in decibels/phase. Phase is always in degrees, not radians. It does not matter if the phase is unwrapped or toggles sigh at 180 degrees.

Some examples

You can find a metric ton of S-parameter data on the web.  Here's an S2P  file for an LNA from United Monolithic Semiconductors.  Note how they added some excellent description of the data, commented out.  They even put a phone number so that this file can phone home! Note that the file follows S11 S21 S12 S22 data order. The # line indicates that frequencies are given in GHz, S-parameters are in decibels, and teh system impedance it is reference to is 50 ohm.  Note that phase is always assumed to be in degrees in SNP files, even though it can be expressed in radians.

!United Monolithic Semiconductors
!Route Départementale 128, B.P.46
!91401
!ORSAY Cedex
!FRANCE
!Tel. +33 (0)1 69 33 03 08
!Fax +33 (0)1 69 33 03 09
!e.mail This email address is being protected from spambots. You need JavaScript enabled to view it.
!__________________________________________________________________________________
!Device: CHA3024-99F, LNA
!features: 2-22GHz, 17dB Gain, 3.5dB NF
!Option: Vd=5V, Vg2=1.7V, Idq=100mA, Temp. 25°C (high gain)
!Ref. On wafer measurement
!__________________________________________________________________________________
!
!F(GHz) dBS11 PhS11 dBS21 PhS21 dBS12 PhS12 dBS22 PhS22
!
# GHZ S DB R 50
1.0 -9.39 -91.53 13.78 176.25 -55.33 137.69 -11.31 -125.55
1.2 -11.38 -101.70 13.64 172.19 -56.76 63.05 -12.50 -154.44
1.4 -13.03 -105.52 14.12 162.19 -51.07 93.60 -14.73 -159.94
1.6 -14.95 -111.80 13.77 160.36 -51.85 75.57 -13.82 159.27
1.8 -17.02 -114.48 14.68 151.26 -55.00 67.88 -19.01 139.84
2.0 -18.33 -113.39 15.20 145.49 -47.24 79.67 -20.67 96.05
2.2 -20.22 -121.01 15.58 137.16 -45.43 84.18 -24.17 52.53
2.4 -22.55 -108.37 15.21 132.03 -47.99 126.94 -18.90 72.54
2.6 -23.29 -109.83 15.71 123.32 -46.02 61.34 -22.79 31.75
2.8 -25.87 -96.46 15.60 118.02 -48.37 67.47 -19.76 37.80
3.0 -25.79 -95.45 16.11 111.71 -44.96 46.57 -17.79 -0.56
3.2 -25.85 -86.95 15.85 104.46 -45.38 63.61 -19.06 7.86
3.4 -25.12 -77.98 16.21 97.98 -45.72 1.53 -17.59 -17.56
3.6 -24.63 -70.25 16.17 90.61 -47.47 14.79 -19.26 -26.09
3.8 -23.84 -70.37 16.30 83.69 -45.61 33.66 -19.04 -42.31
4.0 -22.12 -71.58 16.24 78.61 -46.28 30.42 -17.37 -36.14
4.2 -22.65 -75.14 16.48 71.25 -40.65 1.45 -17.80 -59.21
4.4 -22.55 -73.09 16.38 64.29 -42.44 -5.23 -19.76 -61.67
4.6 -21.58 -71.43 16.39 58.29 -45.73 2.76 -18.89 -65.83
4.8 -21.72 -78.40 16.36 51.88 -42.50 -15.41 -19.72 -68.91
5.0 -21.22 -80.58 16.35 45.41 -43.56 -9.61 -20.16 -71.83
5.2 -20.98 -85.56 16.36 39.69 -42.25 -10.76 -19.14 -75.81
5.4 -20.91 -89.61 16.39 33.46 -43.02 -15.10 -19.00 -85.30
5.6 -20.98 -93.47 16.43 27.28 -40.33 -26.94 -19.06 -95.16
5.8 -21.22 -94.33 16.43 20.78 -40.21 -31.89 -20.38 -100.66
6.0 -21.18 -99.09 16.42 14.66 -40.53 -52.52 -20.43 -109.48
6.2 -21.17 -102.99 16.40 8.44 -38.91 -47.14 -21.23 -116.80
6.4 -21.87 -102.33 16.40 2.04 -39.45 -56.79 -23.16 -122.64
6.6 -22.11 -104.74 16.40 -3.96 -38.98 -67.55 -23.54 -123.10
6.8 -22.61 -108.89 16.33 -10.39 -38.09 -63.63 -25.91 -130.23
7.0 -23.14 -107.62 16.25 -16.14 -40.15 -84.76 -26.46 -111.38
7.2 -22.66 -103.73 16.27 -21.76 -39.05 -76.34 -25.18 -121.23
7.4 -23.20 -106.31 16.29 -27.87 -38.60 -79.11 -26.77 -116.15
7.6 -23.38 -110.35 16.26 -33.81 -38.14 -79.34 -29.86 -133.17
7.8 -23.68 -110.82 16.20 -39.77 -38.42 -81.00 -27.75 -116.19
8.0 -23.77 -111.29 16.25 -45.41 -36.78 -85.34 -31.97 -125.97
8.2 -24.67 -109.76 16.24 -51.67 -36.69 -93.96 -33.12 -110.43
8.4 -24.61 -105.51 16.23 -57.53 -36.42 -105.18 -36.39 -86.11
8.6 -25.17 -104.51 16.23 -63.63 -38.19 -99.53 -33.56 -71.68
8.8 -24.71 -94.89 16.20 -69.50 -36.71 -118.55 -30.08 -57.45
9.0 -24.26 -90.12 16.19 -75.48 -37.32 -130.90 -27.48 -55.24
9.2 -23.92 -89.31 16.18 -81.24 -36.43 -129.68 -26.70 -50.90
9.4 -23.89 -90.64 16.23 -87.29 -37.32 -123.78 -26.77 -52.25
9.6 -23.55 -90.51 16.23 -93.47 -35.31 -138.42 -24.34 -57.68
9.8 -23.16 -90.76 16.18 -99.58 -35.78 -141.06 -24.61 -68.08
10.0 -22.60 -90.53 16.19 -105.29 -35.54 -142.62 -24.10 -65.04
10.2 -22.34 -89.83 16.16 -111.39 -35.47 -159.61 -24.04 -75.07
10.4 -22.16 -90.73 16.21 -117.23 -35.96 -144.42 -25.08 -73.84
10.6 -21.81 -90.81 16.16 -123.48 -34.42 -162.44 -24.13 -73.47
10.8 -20.70 -92.90 16.17 -129.28 -36.73 -161.19 -24.12 -69.07
11.0 -20.73 -97.50 16.18 -135.28 -35.40 -175.23 -24.40 -76.37
11.2 -20.63 -100.08 16.18 -141.32 -34.09 -172.92 -23.91 -82.25
11.4 -21.01 -101.24 16.18 -147.70 -34.42 177.08 -25.11 -84.18
11.6 -21.03 -100.49 16.12 -153.70 -32.91 167.51 -25.70 -74.45
11.8 -20.51 -102.03 16.08 -159.42 -35.62 159.31 -25.24 -68.49
12.0 -20.38 -104.50 16.10 -164.99 -33.80 153.24 -25.05 -73.22
12.2 -20.23 -107.29 16.11 -170.92 -34.49 155.06 -23.48 -67.10
12.4 -19.81 -110.71 16.18 -176.96 -35.20 150.88 -22.65 -63.91
12.6 -19.55 -116.21 16.22 176.99 -33.37 155.91 -22.33 -69.55
12.8 -19.96 -123.04 16.23 170.56 -33.35 140.99 -22.52 -68.97
13.0 -20.02 -124.16 16.26 164.61 -32.87 145.00 -21.18 -70.56
13.2 -20.34 -128.26 16.25 158.53 -33.47 126.01 -20.40 -71.03
13.4 -21.09 -130.37 16.32 152.10 -33.72 140.93 -20.39 -77.76
13.6 -21.51 -139.06 16.35 145.67 -32.87 126.84 -19.95 -79.85
13.8 -21.77 -139.83 16.34 138.99 -33.95 126.16 -19.33 -85.52
14.0 -22.28 -151.82 16.36 132.59 -33.09 114.83 -19.18 -88.70
14.2 -22.74 -160.02 16.36 126.37 -33.64 114.71 -19.09 -97.18
14.4 -24.34 -176.98 16.38 119.05 -34.43 114.17 -19.59 -106.61
14.6 -26.19 160.19 16.32 112.06 -33.81 108.42 -20.54 -109.52
14.8 -30.40 114.25 16.08 105.59 -31.56 103.39 -22.65 -103.70
15.0 -33.85 93.28 16.09 99.48 -31.18 98.99 -22.76 -101.99
15.2 -29.17 55.68 15.90 92.61 -31.60 93.28 -23.27 -98.40
15.4 -25.99 13.73 15.67 87.25 -30.37 89.23 -21.75 -94.32
15.6 -23.84 -18.04 15.68 82.11 -31.28 79.18 -22.33 -97.19
15.8 -22.38 -33.17 15.71 77.31 -30.01 70.50 -21.90 -99.25
16.0 -22.52 -38.00 15.83 70.48 -30.84 70.19 -23.02 -103.71
16.2 -21.43 -36.20 15.79 64.34 -30.19 65.13 -23.06 -99.46
16.4 -20.00 -43.19 15.76 58.41 -29.92 61.73 -22.77 -90.41
16.6 -18.71 -53.40 15.80 52.80 -29.00 50.74 -22.48 -93.64
16.8 -18.74 -66.07 15.91 46.96 -30.24 41.12 -22.47 -97.17
17.0 -18.24 -72.04 16.02 40.48 -29.42 45.87 -22.43 -91.71
17.2 -17.82 -82.37 16.10 33.75 -28.79 37.17 -21.31 -92.50
17.4 -18.06 -98.59 16.22 26.83 -28.50 30.84 -21.44 -101.02
17.6 -18.05 -108.37 16.20 20.00 -28.76 20.76 -21.44 -111.55
17.8 -17.58 -115.01 16.30 13.34 -28.29 12.65 -22.11 -116.74
18.0 -17.20 -122.14 16.44 6.04 -26.89 14.42 -24.03 -116.15
18.2 -17.74 -140.14 16.44 -2.36 -26.86 -4.49 -27.36 -118.33
18.4 -19.45 -155.44 16.27 -10.45 -27.55 -11.78 -35.19 -116.20
18.6 -21.55 -164.70 16.09 -17.30 -28.09 -16.61 -29.02 -42.95
18.8 -23.66 178.46 15.93 -23.70 -28.58 -33.61 -23.67 -44.93
19.0 -23.12 170.55 15.96 -30.66 -28.20 -36.26 -21.94 -44.92
19.2 -23.21 148.03 15.82 -37.58 -27.34 -40.90 -20.12 -43.35
19.4 -23.26 137.45 15.74 -44.46 -28.21 -50.81 -18.16 -55.09
19.6 -22.55 127.01 15.73 -51.14 -28.53 -51.45 -16.10 -65.45
19.8 -21.88 118.42 15.59 -57.79 -29.35 -52.16 -15.14 -74.67
20.0 -21.66 102.26 15.60 -64.94 -30.83 -66.42 -14.89 -84.66
!

Here's an example of an S3P file, from an Analog Devices (Hittite) switch.  The file was much longer, we just show a few frequencies. Here, frequency is in Hz, Port 1 is the common port, Port 2 is the low loss port and Port 3 is the isolated port. Note that  this is a passive reciprocal structure, so that S13 should equal S31.  Then look at the data that we bolded in the first frequency set, they are different by more than 5 dB.  Then realize when we are talking about numbers down at -80 dB, noise plays a big factor and you are lucky that they are even that close!

! Device: HMC1118
! Description: SOI MMIC SPDT Non-Reflective Switch
! Package: LP3DE 16 pin 3x3 mm QFN Plastic Package
! Frequency: 9 kHz - 13.00 GHz
!
! Ports:
! RFC = Port 1
! RF1 = Port 2
! RF2 = Port 3
!
! State: RF1 Selected
!
! Supply Voltage:
! Vdd = +3.3 V
! Vss = -2.5 V
!
! Control Voltages:
! LS = 0 V
! Vctl = +3.3 V
!
! Data: Data was collected using a calibrated network analyzer with AFR software.
! Fixtures were calculated using AFR and fixturing was applied to collect
! this Deembedded S Parameter data of HMC1118.
!
! Note: Analog Devices supplies this data as a sample of measured data at the package pin
! for this product. Your particular data for this product may vary.
! Data was taken at 25 degrees C.
! Analog Devices reserves the right to change this data at anytime.
!
# Hz S dB R 50
10000000 -27.869108 1.9279197 -0.38189247 -0.33050394 -81.955063 -34.127796
-0.39891595 -0.31272164 -28.197519 2.651551 -78.527115 -148.66908
-75.563889 -36.568817 -92.865952 -107.75321 -36.758484 73.327232
20000000 -28.128859 0.46426103 -0.386987 -0.40144929 -86.998352 165.7236
-0.3915855 -0.41016531 -28.088383 0.64914262 -81.324615 -100.10807
-73.797485 -147.92537 -80.097481 81.11422 -41.544853 60.542408
30000000 -28.182211 -0.33713344 -0.3872011 -0.49809608 -83.608833 53.517818
-0.39440522 -0.51251769 -28.13781 -0.51719272 -90.635689 2.5970528
-81.101303 174.34894 -79.808945 -87.237289 -43.677464 49.485748
40000000 -28.149401 -1.3495355 -0.38928571 -0.61589319 -94.856361 24.56739
-0.39621338 -0.63237262 -28.169209 -1.2282417 -80.029335 -54.2911
-78.740204 160.72978 -94.928345 11.535428 -44.817322 42.341946
50000000 -28.182722 -1.3553114 -0.3907927 -0.75995862 -81.269958 87.543777
-0.3992486 -0.76439703 -28.181091 -1.9362835 -80.971382 -68.935402
-82.309334 120.58683 -89.860619 -91.46711 -45.165192 38.798882
60000000 -28.243807 -2.4511375 -0.39553657 -0.89719892 -81.110855 54.478725
-0.39777502 -0.90262198 -28.197227 -2.3064837 -88.319923 -102.20636
-76.50235 28.364262 -88.540138 -20.806389 -45.577065 32.328232
70000000 -28.325607 -2.7070074 -0.39508897 -1.0274358 -77.260834 91.328018
-0.40147659 -1.016976 -28.211517 -2.5040538 -81.854614 32.652962
-76.183098 74.865646 -80.985512 10.65926 -45.429565 31.959295
80000000 -28.319256 -2.9415271 -0.39811161 -1.1582967 -77.756401 100.22378
-0.4052299 -1.1709224 -28.223093 -2.7275136 -93.45015 -127.91241
-76.603828 89.949532 -80.629509 -137.09113 -45.642239 30.809378
90000000 -28.391142 -3.8000386 -0.39867464 -1.2913489 -76.555016 67.339348
-0.40506315 -1.2907393 -28.190201 -2.9909928 -84.100502 39.449806
-74.492249 92.058769 -92.475433 43.388859 -45.617531 30.205961
100000000 -28.40336 -3.5953505 -0.40124041 -1.4174408 -76.971725 89.431908
-0.40619421 -1.4113326 -28.222563 -3.6627159 -89.885201 -128.56389
-76.911583 85.140739 -89.340462 168.46625 -45.725777 27.874329
110000000 -28.421734 -3.7622373 -0.40329722 -1.5420058 -74.482704 80.08342
-0.40736732 -1.5400803 -28.238125 -4.1114655 -86.947952 -61.618458
-75.179672 82.701942 -86.964615 -87.710625 -45.651943 27.932955
! Etc. etc etc....

Here's a page on faking S3P files from two-port data.

Noise data

On a separate page we show you how to take a manufacturer's S-parameters and add noise parameters. The gamma opt and RN will be faked, but at least the circuit will have correct NF when it sees fifty ohms.

MDIF files

EEsof (Keysight, Agilent, HP) MDIF (measurement data interchange format) and uses the 11 21 12 22 order of Touchstone.  These files contain multiple sets of S-parameters, where an independent variable such as gate voltage is varied. More to come!

 

 

 

Author : Unknown Editor

Advertisement