Is there any way to save results from Nanovna saver to a csv file? -- Dick, WO1I/F4WBK
|
Dick,
The saver format is Touchstone and converting csv to Touchstone, I have used Mathcad or Excell and simply re format the data as required. Going the other way, same deal. I do not believe saver has an option to output in csv, but you might want to check with the author.
Alan
|
I have been saving s1p and s2p files from Saver and then re-save them as .txt files. In Excel I import external data in the .txt format and delimit using spaces. This works well for using S21 Thru and S21 Shunt methods for calculating low impedances and high impedances. Having a great time with this little NanoVNA. BTW, when I was involved with hp network analyzers never heard the term VNA for them as it was assumed they could measure the amplitude and phase. They were referred to as network analyzers. Or scaler network analyzers for those that could not determine phase relationships (they used diode detectors only).
|
On 9/13/20 5:23 PM, WB2UAQ wrote: I have been saving s1p and s2p files from Saver and then re-save them as .txt files. In Excel I import external data in the .txt format and delimit using spaces. This works well for using S21 Thru and S21 Shunt methods for calculating low impedances and high impedances. Having a great time with this little NanoVNA. BTW, when I was involved with hp network analyzers never heard the term VNA for them as it was assumed they could measure the amplitude and phase. They were referred to as network analyzers. Or scaler network analyzers for those that could not determine phase relationships (they used diode detectors only).
\ Well, Keysight (nee Agilent, nee HP) also has PNAs and XNAs these days, too <grin> There are VNAs that use only diode detectors (look up 6-port analyzer) - they work sort of like the 3 meter technique for measuring impedance. For what it's worth, there are libraries in Python to read "touchstone" files (i.e. s1p, s2p, etc.). scikit-rf (aka skrf) is an Open Source, BSD-licensed package for RF/Microwave engineering implemented in the Python programming language. It provides a modern, object-oriented library which is both flexible and scalable. The documentation below is broken up into three sections; narrative tutorials, practical examples, and a reference API. Does Smith Charts, complex plane, and various and sundry variable vs frequency plots. And it can do transformations among types of networks (S,T, Y, Z, etc.) It also does VNA calibration (12 term, 8 term, etc.) and things like arbitrary N-ports, cascades, and de-embedding.
|
Hi I just joined the list. I am brand new to VNA's and especially to s1p/s2p style files. Is there a way to parce the data? When I open an s1p file in wordpad, I see 101 frequency points, each followed by 2 sets of numbers with 9 decimal points for each frequency interval in the sweep. Is there a formula one can write in excel to spit out the actual numbers one might want such as VSWR, impedance and return loss at each frequency interval? Or can someone give me a crash course in interpreting those numbers? I'm using the NanoVNA and everything works great in the software and on the unit. But I would like to be able to open a spread sheet and see VSWR/impedance/return loss at each frequency for reference purposes. Or whatever measurement I want to look at for that matter The fox delta antenna analyzer software has a very handy table feature where it will show measurements in a table by frequency. It would be super cool if something like that could be implemented in something like Roger's Nanosharp
I've imported a txt version of a s1p file into excel and while it certainly shortens the number string, it still doesn't necessarily give me the info I'm seeking. That's obviously because I don't know exactly how to interpret the data. Googling for help doesn't really get me much either.
Thanks for any help.
Regards Colin
toggle quoted message
Show quoted text
-----Original Message----- From: WB2UAQ Sent: Sunday, September 13, 2020 6:23 PM To: [email protected]Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver I have been saving s1p and s2p files from Saver and then re-save them as .txt files. In Excel I import external data in the .txt format and delimit using spaces. This works well for using S21 Thru and S21 Shunt methods for calculating low impedances and high impedances. Having a great time with this little NanoVNA. BTW, when I was involved with hp network analyzers never heard the term VNA for them as it was assumed they could measure the amplitude and phase. They were referred to as network analyzers. Or scaler network analyzers for those that could not determine phase relationships (they used diode detectors only).
|
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3) You can populate that formula down all rows to get a colomn showing SWR at each frequency. You can of course create formatting to show any numbers that fall below say 1.5 within that colomn in a different colour. The same can be done for impedance and Return loss using the impedance and RL equations using MA or RI data. It's fiddly. Microwaves101 actually has a downloadable excel spreadsheet where you can paste the S data in from the s1p/s2p file and it already contains all the formulas and colors one might want.
to download the utility spreadsheet:
It is actually a very helpful website with loads of great information specific to what we are doing with the VNA's. I know many on list already understand much of this stuff, but I am just getting started with it so a resource like this is super helpful.
Regards Colin
toggle quoted message
Show quoted text
-----Original Message----- From: Jim Lux Sent: Sunday, September 13, 2020 6:59 PM To: [email protected]Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver On 9/13/20 5:23 PM, WB2UAQ wrote: I have been saving s1p and s2p files from Saver and then re-save them as .txt files. In Excel I import external data in the .txt format and delimit using spaces. This works well for using S21 Thru and S21 Shunt methods for calculating low impedances and high impedances. Having a great time with this little NanoVNA. BTW, when I was involved with hp network analyzers never heard the term VNA for them as it was assumed they could measure the amplitude and phase. They were referred to as network analyzers. Or scaler network analyzers for those that could not determine phase relationships (they used diode detectors only).
\ Well, Keysight (nee Agilent, nee HP) also has PNAs and XNAs these days, too <grin> There are VNAs that use only diode detectors (look up 6-port analyzer) - they work sort of like the 3 meter technique for measuring impedance. For what it's worth, there are libraries in Python to read "touchstone" files (i.e. s1p, s2p, etc.). scikit-rf (aka skrf) is an Open Source, BSD-licensed package for RF/Microwave engineering implemented in the Python programming language. It provides a modern, object-oriented library which is both flexible and scalable. The documentation below is broken up into three sections; narrative tutorials, practical examples, and a reference API. Does Smith Charts, complex plane, and various and sundry variable vs frequency plots. And it can do transformations among types of networks (S,T, Y, Z, etc.) It also does VNA calibration (12 term, 8 term, etc.) and things like arbitrary N-ports, cascades, and de-embedding.
|
Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct.?? "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M)?? where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
toggle quoted message
Show quoted text
Il 14/09/2020 22:51, Colin McDonald ha scritto: With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
On 9/15/20 3:55 AM, Piero Tognolatti wrote: Hi Colin, Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct.?? "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11. Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M)?? where M is the magnitude of S11, taken from the proper column of a s2p file in MA format. At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards Piero, I0KPT
if it *is* in real/imaginary form, then SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1) Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
Excellent! Thanks for the clerification. I didn't really understand the difference between MA and RI before. I read through the touchstone specifications document, but don't remember if there is a set standard for s1p/s2p with regard to which contains RI and which contains Ma data. It seems to me that it would be nice to be able to determine which you wish to export from within the program then export as such. Unless there is a standard already in which case you just save to s1p or s2p depending on which data you want.
Thanks for helping so far. I will have more questions.
Regards Colin va6bkx
toggle quoted message
Show quoted text
-----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 7:12 AM To: [email protected]Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver On 9/15/20 3:55 AM, Piero Tognolatti wrote: Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct. "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M) where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
if it *is* in real/imaginary form, then SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1) Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
On 9/15/20 2:32 PM, Colin McDonald wrote: Excellent! Thanks for the clerification. I didn't really understand the difference between MA and RI before. I read through the touchstone specifications document, but don't remember if there is a set standard for s1p/s2p with regard to which contains RI and which contains Ma data. It seems to me that it would be nice to be able to determine which you wish to export from within the program then export as such. you look at the header of the file starting with # ! Vector Network Analyzer VNA R2 ! Tucson Amateur Packet Radio ! Saturday, 9 November, 2019 17:48:47 ! Frequency S11 S21 S12 S22 ! ListType=Lin # HZ S RI R 50 ^^ tells you it's in real/imaginary form. here's a MA format one # MHZ S MA R 50 10.0000 0.915 -63.193 57.033 142.886 0.013 51.862 0.525 -89.730 20.0000 0.830 -99.758 40.867 122.518 0.021 32.533 0.638 -123.891 30.0000 0.787 -121.018 30.176 110.861 0.022 20.814 0.684 -140.388 40.0000 0.765 -134.056 23.331 103.406 0.023 15.181 0.708 -149.561 And, there's a third format.. "DB", where the S parameter is in dB magnitude and degrees phase. # MHZ S DB R 50 !Frequency S11 dB S11 DEG S12 dB S12 DEG S13 dB S13 DEG S14 dB S14 DEG ! S21 dB S21 DEG S22 dB S22 DEG S23 dB S23 DEG S24 dB S24 DEG ! S31 dB S31 DEG S32 dB S32 DEG S33 dB S33 DEG S34 dB S34 DEG ! S41 dB S41 DEG S42 dB S42 DEG S43 dB S43 DEG S44 dB S44 DEG .3000 -2.335942E+001 9.800809E+000 -6.468416E-001 -3.088451E-001 -1.268429E+001 8.693548E+000 -1.267583E+001 -1.722793E+002 -6.292930E-001 -4.186788E-001 -2.338740E+001 7.548462E+000 -1.271809E+001 -1.711522E+002 -1.271509E+001 7.882564E+000 Unless there is a standard already in which case you just save to s1p or s2p depending on which data you want.
S1P is "one port" data, S2P is two port. S4P is four port (you see this for transformers with a center tap).. Thanks for helping so far. I will have more questions. Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 7:12 AM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver On 9/15/20 3:55 AM, Piero Tognolatti wrote:
Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct.?? "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M)?? where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
if it *is* in real/imaginary form, then SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1)
Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
is there yet another equation to calculate swr from DB?
Regards Colin va6bkx
toggle quoted message
Show quoted text
-----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 3:47 PM To: [email protected]Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver On 9/15/20 2:32 PM, Colin McDonald wrote: Excellent! Thanks for the clerification. I didn't really understand the difference between MA and RI before. I read through the touchstone specifications document, but don't remember if there is a set standard for s1p/s2p with regard to which contains RI and which contains Ma data. It seems to me that it would be nice to be able to determine which you wish to export from within the program then export as such. you look at the header of the file starting with # ! Vector Network Analyzer VNA R2 ! Tucson Amateur Packet Radio ! Saturday, 9 November, 2019 17:48:47 ! Frequency S11 S21 S12 S22 ! ListType=Lin # HZ S RI R 50 ^^ tells you it's in real/imaginary form. here's a MA format one # MHZ S MA R 50 10.0000 0.915 -63.193 57.033 142.886 0.013 51.862 0.525 -89.730 20.0000 0.830 -99.758 40.867 122.518 0.021 32.533 0.638 -123.891 30.0000 0.787 -121.018 30.176 110.861 0.022 20.814 0.684 -140.388 40.0000 0.765 -134.056 23.331 103.406 0.023 15.181 0.708 -149.561 And, there's a third format.. "DB", where the S parameter is in dB magnitude and degrees phase. # MHZ S DB R 50 !Frequency S11 dB S11 DEG S12 dB S12 DEG S13 dB S13 DEG S14 dB S14 DEG ! S21 dB S21 DEG S22 dB S22 DEG S23 dB S23 DEG S24 dB S24 DEG ! S31 dB S31 DEG S32 dB S32 DEG S33 dB S33 DEG S34 dB S34 DEG ! S41 dB S41 DEG S42 dB S42 DEG S43 dB S43 DEG S44 dB S44 DEG .3000 -2.335942E+001 9.800809E+000 -6.468416E-001 -3.088451E-001 -1.268429E+001 8.693548E+000 -1.267583E+001 -1.722793E+002 -6.292930E-001 -4.186788E-001 -2.338740E+001 7.548462E+000 -1.271809E+001 -1.711522E+002 -1.271509E+001 7.882564E+000 Unless there is a standard already in which case you just save to s1p or s2p depending on which data you want.
S1P is "one port" data, S2P is two port. S4P is four port (you see this for transformers with a center tap).. Thanks for helping so far. I will have more questions.
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 7:12 AM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 3:55 AM, Piero Tognolatti wrote:
Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct. "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M) where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
if it *is* in real/imaginary form, then
SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1)
Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
Get the (magnitude of) S11 in dB from s2p file in DB format, call it DB and then use the following two formulas
?M = 10 ^ (DB / 20)
SWR = (1+M) / (1-M)
regards
Piero, I0KPT
toggle quoted message
Show quoted text
Il 16/09/2020 05:33, Colin McDonald ha scritto: is there yet another equation to calculate swr from DB?
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 3:47 PM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 2:32 PM, Colin McDonald wrote:
Excellent! Thanks for the clerification. I didn't really understand the difference between MA and RI before. I read through the touchstone specifications document, but don't remember if there is a set standard for s1p/s2p with regard to which contains RI and which contains Ma data. It seems to me that it would be nice to be able to determine which you wish to export from within the program then export as such. you look at the header of the file starting with #
! Vector Network Analyzer VNA R2 ! Tucson Amateur Packet Radio ! Saturday, 9 November, 2019?? 17:48:47 ! Frequency????????????? S11?????????????????????????? S21 ???????????? S12??????????????????????????? S22 ! ListType=Lin # HZ? S? RI R 50
???????? ^^
tells you it's in real/imaginary form.
here's a MA format one
# MHZ? S? MA? R? 50 ?10.0000??? 0.915? -63.193?? 57.033? 142.886??? 0.013?? 51.862 0.525 ?-89.730 ?20.0000??? 0.830? -99.758?? 40.867? 122.518??? 0.021?? 32.533 0.638 -123.891 ?30.0000??? 0.787 -121.018?? 30.176? 110.861??? 0.022?? 20.814 0.684 -140.388 ?40.0000??? 0.765 -134.056?? 23.331? 103.406??? 0.023?? 15.181 0.708 -149.561
And, there's a third format.. "DB", where the S parameter is in dB magnitude and degrees phase.
# MHZ S DB R 50 !Frequency??????? S11 dB? S11 DEG?? S12 dB? S12 DEG?? S13 dB? S13 DEG S14 dB? S14 DEG !???????????????? S21 dB? S21 DEG?? S22 dB? S22 DEG?? S23 dB? S23 DEG S24 dB? S24 DEG !???????????????? S31 dB? S31 DEG?? S32 dB? S32 DEG?? S33 dB? S33 DEG S34 dB? S34 DEG !???????????????? S41 dB? S41 DEG?? S42 dB? S42 DEG?? S43 dB? S43 DEG S44 dB? S44 DEG ??? .3000???? -2.335942E+001? 9.800809E+000 -6.468416E-001 -3.088451E-001 -1.268429E+001? 8.693548E+000 -1.267583E+001 -1.722793E+002 ????????????? -6.292930E-001 -4.186788E-001 -2.338740E+001 7.548462E+000 -1.271809E+001 -1.711522E+002 -1.271509E+001 7.882564E+000
Unless there is a standard already in which case you just save to s1p or s2p depending on which data you want.
S1P is "one port" data, S2P is two port.?? S4P is four port (you see this for transformers with a center tap)..
Thanks for helping so far. I will have more questions.
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 7:12 AM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 3:55 AM, Piero Tognolatti wrote:
Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct.?? "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M)?? where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
if it *is* in real/imaginary form, then
SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1)
Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
On 9/15/20 8:33 PM, Colin McDonald wrote: is there yet another equation to calculate swr from DB?
mag = 10^(dB/20) swr = (mag+1)/(mag-1) or you can combine it swr = (10^(dB/20)+1)/(10^(dB/20)-1) the reflection coefficient magnitude is *voltage* not power, so that's why you divide by 20 when converting. Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 3:47 PM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver On 9/15/20 2:32 PM, Colin McDonald wrote:
Excellent! Thanks for the clerification. I didn't really understand the difference between MA and RI before. I read through the touchstone specifications document, but don't remember if there is a set standard for s1p/s2p with regard to which contains RI and which contains Ma data. It seems to me that it would be nice to be able to determine which you wish to export from within the program then export as such. you look at the header of the file starting with # ! Vector Network Analyzer VNA R2 ! Tucson Amateur Packet Radio ! Saturday, 9 November, 2019?? 17:48:47 ! Frequency????????????? S11?????????????????????????? S21 ???????????? S12??????????????????????????? S22 ! ListType=Lin # HZ? S? RI R 50 ???????? ^^ tells you it's in real/imaginary form. here's a MA format one # MHZ? S? MA? R? 50 ?10.0000??? 0.915? -63.193?? 57.033? 142.886??? 0.013?? 51.862??? 0.525 ?-89.730 ?20.0000??? 0.830? -99.758?? 40.867? 122.518??? 0.021?? 32.533??? 0.638 -123.891 ?30.0000??? 0.787 -121.018?? 30.176? 110.861??? 0.022?? 20.814??? 0.684 -140.388 ?40.0000??? 0.765 -134.056?? 23.331? 103.406??? 0.023?? 15.181??? 0.708 -149.561 And, there's a third format.. "DB", where the S parameter is in dB magnitude and degrees phase. # MHZ S DB R 50 !Frequency??????? S11 dB? S11 DEG?? S12 dB? S12 DEG?? S13 dB? S13 DEG S14 dB? S14 DEG !???????????????? S21 dB? S21 DEG?? S22 dB? S22 DEG?? S23 dB? S23 DEG S24 dB? S24 DEG !???????????????? S31 dB? S31 DEG?? S32 dB? S32 DEG?? S33 dB? S33 DEG S34 dB? S34 DEG !???????????????? S41 dB? S41 DEG?? S42 dB? S42 DEG?? S43 dB? S43 DEG S44 dB? S44 DEG ??? .3000???? -2.335942E+001? 9.800809E+000 -6.468416E-001 -3.088451E-001 -1.268429E+001? 8.693548E+000 -1.267583E+001 -1.722793E+002 ????????????? -6.292930E-001 -4.186788E-001 -2.338740E+001 7.548462E+000 -1.271809E+001 -1.711522E+002 -1.271509E+001? 7.882564E+000
Unless there is a standard already in which case you just save to s1p or s2p depending on which data you want.
S1P is "one port" data, S2P is two port.?? S4P is four port (you see this for transformers with a center tap)..
Thanks for helping so far. I will have more questions.
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 7:12 AM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 3:55 AM, Piero Tognolatti wrote:
Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct.?? "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M)?? where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
if it *is* in real/imaginary form, then
SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1)
Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
On 9/16/20 5:49 AM, Jim Lux wrote: On 9/15/20 8:33 PM, Colin McDonald wrote:
is there yet another equation to calculate swr from DB?
mag = 10^(dB/20) swr = (mag+1)/(mag-1) or you can combine it swr = (10^(dB/20)+1)/(10^(dB/20)-1) the reflection coefficient magnitude is *voltage* not power, so that's why you divide by 20 when converting.
No coffee yet.. swap the order of the add and subtract.. otherwise you get negative swr.. (1+mag)/(1-mag)
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 3:47 PM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 2:32 PM, Colin McDonald wrote:
Excellent! Thanks for the clerification. I didn't really understand the difference between MA and RI before. I read through the touchstone specifications document, but don't remember if there is a set standard for s1p/s2p with regard to which contains RI and which contains Ma data. It seems to me that it would be nice to be able to determine which you wish to export from within the program then export as such. you look at the header of the file starting with #
! Vector Network Analyzer VNA R2 ! Tucson Amateur Packet Radio ! Saturday, 9 November, 2019?? 17:48:47 ! Frequency????????????? S11?????????????????????????? S21 ????????????? S12??????????????????????????? S22 ! ListType=Lin # HZ? S? RI R 50
????????? ^^
tells you it's in real/imaginary form.
here's a MA format one
# MHZ? S? MA? R? 50 ??10.0000??? 0.915? -63.193?? 57.033? 142.886??? 0.013?? 51.862??? 0.525 ??-89.730 ??20.0000??? 0.830? -99.758?? 40.867? 122.518??? 0.021?? 32.533??? 0.638 -123.891 ??30.0000??? 0.787 -121.018?? 30.176? 110.861??? 0.022?? 20.814??? 0.684 -140.388 ??40.0000??? 0.765 -134.056?? 23.331? 103.406??? 0.023?? 15.181??? 0.708 -149.561
And, there's a third format.. "DB", where the S parameter is in dB magnitude and degrees phase.
# MHZ S DB R 50 !Frequency??????? S11 dB? S11 DEG?? S12 dB? S12 DEG?? S13 dB? S13 DEG S14 dB? S14 DEG !???????????????? S21 dB? S21 DEG?? S22 dB? S22 DEG?? S23 dB? S23 DEG S24 dB? S24 DEG !???????????????? S31 dB? S31 DEG?? S32 dB? S32 DEG?? S33 dB? S33 DEG S34 dB? S34 DEG !???????????????? S41 dB? S41 DEG?? S42 dB? S42 DEG?? S43 dB? S43 DEG S44 dB? S44 DEG ???? .3000???? -2.335942E+001? 9.800809E+000 -6.468416E-001 -3.088451E-001 -1.268429E+001? 8.693548E+000 -1.267583E+001 -1.722793E+002 ?????????????? -6.292930E-001 -4.186788E-001 -2.338740E+001 7.548462E+000 -1.271809E+001 -1.711522E+002 -1.271509E+001? 7.882564E+000
Unless there is a standard already in which case you just save to s1p or s2p depending on which data you want.
S1P is "one port" data, S2P is two port.?? S4P is four port (you see this for transformers with a center tap)..
Thanks for helping so far. I will have more questions.
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 7:12 AM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 3:55 AM, Piero Tognolatti wrote:
Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct.?? "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M)?? where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
if it *is* in real/imaginary form, then
SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1)
Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|
Thanks I apreciate the help with this stuff.
Regards Colin va6bkx
toggle quoted message
Show quoted text
-----Original Message----- From: Jim Lux Sent: Wednesday, September 16, 2020 7:10 AM To: [email protected]Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver On 9/16/20 5:49 AM, Jim Lux wrote: On 9/15/20 8:33 PM, Colin McDonald wrote:
is there yet another equation to calculate swr from DB?
mag = 10^(dB/20) swr = (mag+1)/(mag-1)
or you can combine it
swr = (10^(dB/20)+1)/(10^(dB/20)-1)
the reflection coefficient magnitude is *voltage* not power, so that's why you divide by 20 when converting.
No coffee yet.. swap the order of the add and subtract.. otherwise you get negative swr.. (1+mag)/(1-mag)
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 3:47 PM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 2:32 PM, Colin McDonald wrote:
Excellent! Thanks for the clerification. I didn't really understand the difference between MA and RI before. I read through the touchstone specifications document, but don't remember if there is a set standard for s1p/s2p with regard to which contains RI and which contains Ma data. It seems to me that it would be nice to be able to determine which you wish to export from within the program then export as such. you look at the header of the file starting with #
! Vector Network Analyzer VNA R2 ! Tucson Amateur Packet Radio ! Saturday, 9 November, 2019 17:48:47 ! Frequency S11 S21 S12 S22 ! ListType=Lin # HZ S RI R 50
^^
tells you it's in real/imaginary form.
here's a MA format one
# MHZ S MA R 50 10.0000 0.915 -63.193 57.033 142.886 0.013 51.862 0.525 -89.730 20.0000 0.830 -99.758 40.867 122.518 0.021 32.533 0.638 -123.891 30.0000 0.787 -121.018 30.176 110.861 0.022 20.814 0.684 -140.388 40.0000 0.765 -134.056 23.331 103.406 0.023 15.181 0.708 -149.561
And, there's a third format.. "DB", where the S parameter is in dB magnitude and degrees phase.
# MHZ S DB R 50 !Frequency S11 dB S11 DEG S12 dB S12 DEG S13 dB S13 DEG S14 dB S14 DEG ! S21 dB S21 DEG S22 dB S22 DEG S23 dB S23 DEG S24 dB S24 DEG ! S31 dB S31 DEG S32 dB S32 DEG S33 dB S33 DEG S34 dB S34 DEG ! S41 dB S41 DEG S42 dB S42 DEG S43 dB S43 DEG S44 dB S44 DEG .3000 -2.335942E+001 9.800809E+000 -6.468416E-001 -3.088451E-001 -1.268429E+001 8.693548E+000 -1.267583E+001 -1.722793E+002 -6.292930E-001 -4.186788E-001 -2.338740E+001 7.548462E+000 -1.271809E+001 -1.711522E+002 -1.271509E+001 7.882564E+000
Unless there is a standard already in which case you just save to s1p or s2p depending on which data you want.
S1P is "one port" data, S2P is two port. S4P is four port (you see this for transformers with a center tap)..
Thanks for helping so far. I will have more questions.
Regards Colin va6bkx -----Original Message----- From: Jim Lux Sent: Tuesday, September 15, 2020 7:12 AM To: [email protected] Subject: Re: [nanovna-users] Writing nanovna results to csv file #nanovna-saver
On 9/15/20 3:55 AM, Piero Tognolatti wrote:
Hi Colin,
Please, note that s2p file is in the "RI" format, your formula to compute SWR is not correct. "RI" means that one column (2nd column) shows the real part of S11, while the other column (3rd column) the imaginary part of S11.
Your formula is correct when the s2p file is in the "MA" format, which means that one column is the Magnitude of the S11, while the other column is the Angle of the S11. Let me recast your formula saying that SWR = (1+M) / (1-M) where M is the magnitude of S11, taken from the proper column of a s2p file in MA format.
At the moment I cannot run nanoVNA-saver, so I don't know if the exported s2p file are in MA or RI format.
regards
Piero, I0KPT
if it *is* in real/imaginary form, then
SWR = (SQRT(R^2+I^2)+1)/(SQRT(R^2+I^2-1)
Il 14/09/2020 22:51, Colin McDonald ha scritto:
With some more research I managed to create a formula to show swr in a SNP spread sheet. SWR = (MA+1)/(1-MA) Where MA (or RI) is the second colomn in the spread sheet. for instance SWR = (B3+1)/(1-B3)
|