¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Touchstone file format #consolecommands #docs


 

In a .S1P file it is not an impedance that is described but S11
If you want the impedances you have to recalculate them from S11
Did you see the example 9 and 10 from my posting below (out of touchstone rev 2.0 spec)?

Example 9 (Version 1.0):
!1-port Z-parameter file, multiple frequency points
Example 10 (Version 2.0):
!1-port Z-parameter file, multiple frequency points
You can for sure store also impedance in a s1p file if you calculate the Z-parameter from S-parameter - this is what my tool does, fetching S11-parameter, taking a line for line with S-parameter (freq S11.re S11.im) and creating lines of normalized Z-parameter (freq R/Z0 X/Z0) preceded by a header for Z-parameter (# HZ Z RI R 50).

Calculation:

if format_z:
# calculate normalized impedance as Rn + jXn = R/Z0 + jX/Z0 according to this doc
#
freq, Sr, Si = line[:-1].split( ' ' )
freq = float( freq )
Sr = float( Sr )
Si = float( Si )
Sr2 = Sr * Sr
Si2 = Si * Si
Sr_2 = ( 1 - Sr ) * ( 1 - Sr )
Rn = ( 1 - ( Si2 + Sr2 ) ) / ( Sr_2 + Si2 )
Xn = ( 2 * Si ) / ( Sr_2 + Si2 )
return f'{freq:10.0f} {Rn:15.9f} {Xn:15.9f}'

Join [email protected] to automatically receive all group messages.