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)