Author Topic: NanoVNA Custom Software  (Read 476961 times)

0 Members and 13 Guests are viewing this topic.

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1350 on: November 03, 2021, 01:42:53 pm »
Looking at my software, the regional settings would effect the Touchstone files for all of my programs.  I can certainly change my software to display the comma like you're used to but write text files with the decimal.       

I would have thought that countries using the comma separator would want that across the board.  But it sounds like in some cases you want the comma and others you don't.  I don't see in the standard where they specifically mandate the separator.   

Before I make any changes, I would be interested in hearing from those of you living in these areas if you want the Touchstone to reflect your regional settings, always use the decimal, or keep it as is and use the INI file?   It's quick change for me, so no big deal but let's make sure that it's the right solution.
Hello, Joe,
Thanks for comments on this issue!
For sure, to make all the S2P files export-import process straightforward,  the Touchstone files should always use a dot separator.
This is the only way to work with S2P files in other SW tools correctly.
In all other cases, I suppose, comma or dot don't really matters.

Thanks,
Alex
« Last Edit: November 03, 2021, 01:45:15 pm by Alextsu »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1351 on: November 04, 2021, 12:20:06 am »
I'm sure you are aware that I posted in the IOgroups as well.   Outside of you, zero feedback. 

I wonder how you deal with other software tools.   It is that the culture is so tied to the comma that you just can't get rid of it?   Now you're stuck with some sort of hybrid case?   Maybe similar to the USA and the metric system.   We just can't seem to pitch the old British units.  But I digress.

Let me give the whole Touchstone subject some thought.  The import was added for my own testing and is not generic.   This really needs to be created from scratch.  It also only stores to memory which again is not very useful. 

In the mean time, you should be able to change the INI file to handle the writes.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1352 on: November 04, 2021, 03:37:58 pm »
I rewrote the Touchstone import from scratch.   It supports (DB, MA, RI) (G, M, K and Hz) formats.  It should handle both S1P and S2P automatically.   It checks  for the frequency to increase and no tokens after any data is found.  Comments are allowed throughout the file.  The software expects at least one space (0x20) to be used as a delimiter.   Some files will used more than one space.  Others will end the line with a space.   The software handles these cases as well.   

I had discovered AppCAD actually has support for stability circles.  When I tried to feed it a TS file from the Youtube example,  I also learned that it requires at least two data points.  So, I replicated the dataset and increased the frequency.  (see attached TS file).   

While testing, I also found that my last software has a MAJOR bug with the stability circles.   When I went from my test code to the actual subroutine, I screwed up the math.   So, both of those versions are wrong!

The software now exports Touchstone files with the decimal point.   It also expects the decimal to be used on any files you import.   Attached shows the original test code, AppCAD, RF Assistant and my latest 2.06 software showing the attached Touchstone file.     

If you have Touchstone files you would like to try as test cases, go ahead and upload them and I can run them through.   
 
The following users thanked this post: croma641, Alextsu

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1353 on: November 04, 2021, 06:12:24 pm »
I rewrote the Touchstone import from scratch.   It supports (DB, MA, RI) (G, M, K and Hz) formats.  It should handle both S1P and S2P automatically.   It checks  for the frequency to increase and no tokens after any data is found.  Comments are allowed throughout the file.  The software expects at least one space (0x20) to be used as a delimiter.   Some files will used more than one space.  Others will end the line with a space.   The software handles these cases as well.   

Thank You, that's great!
Do You mean that the space delimeter is expected for comments or for data?
As I understand, usually the TS files use TAB delimeter for data and space delimeter for comments.

...
The software now exports Touchstone files with the decimal point.   It also expects the decimal to be used on any files you import.   Attached shows the original test code, AppCAD, RF Assistant and my latest 2.06 software showing the attached Touchstone file.     

If you have Touchstone files you would like to try as test cases, go ahead and upload them and I can run them through.

Attached is a pair of .S2P files I have at hand, one of them (named "Ports 1,2 open"), had been taken from Jan's VNA ports isolation test (with both ports open, 0-6 GHz span).This comes with a screenshot.
You might also test SW with the example files from AppCAD's folder.


By the way, the problem I had previously with the regional settings, had been  solved by editing the .ini file.

One problem I had noticed while trying to load S2P files in Your SW (V2+4 vers.2.05) is that I could not get the "2-port plots" in the "Advanced" tab updated when I load a new S2P file. Pressing the "Stability" button in the Main tab seems to have no effect on this graphs.

AppCad is a nice app, but is a bit tricky to use, it often throws errors like "Imput must be a Numeric Value".








 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1354 on: November 04, 2021, 08:49:32 pm »
Do You mean that the space delimeter is expected for comments or for data?
As I understand, usually the TS files use TAB delimeter for data and space delimeter for comments.

From the 1.1 standard:

2.   Only ASCII characters, as defined in ANSI Standard X3.4-1986, may be used in a Touchstone file.  The use of characters with codes greater than hexadecimal 07E is not allowed.  Also, ASCII control characters (those numerically less than hexadecimal 20) are not allowed, except for tabs or in a line termination sequence (carriage-return or carriage-return/line-feed combination).
Note:  The use of Tab characters is strongly discouraged.


I will do my part to discourage the use of the Tab and not support it.  I also do not support the newer standards.

Attached is a pair of .S2P files I have at hand, one of them (named "Ports 1,2 open"), had been taken from Jan's VNA ports isolation test (with both ports open, 0-6 GHz span).This comes with a screenshot.
You might also test SW with the example files from AppCAD's folder.

I had ran the one from the RFAssistant with no problem.  The one you uploaded from Jan's VNA will also loads just fine.   Timely post as I had collected that same data for the two V2Plus VNAs I have.  The Jan VNA seems to add a filter of sorts after 3GHz to improve the dynamic range.  I would guess it is slower running sweeps above 3GHz compared with ones below it.   If you can turn this off, we could compare all three. 

I also show the data below 1.5GHz.  The real advantage would be getting all four S-parameters and much better dynamic range above 1.5GHz.  Still you give up a lot on the low end.   

By the way, the problem I had previously with the regional settings, had been  solved by editing the .ini file.

One problem I had noticed while trying to load S2P files in Your SW (V2+4 vers.2.05) is that I could not get the "2-port plots" in the "Advanced" tab updated when I load a new S2P file. Pressing the "Stability" button in the Main tab seems to have no effect on this graphs.

AppCad is a nice app, but is a bit tricky to use, it often throws errors like "Imput must be a Numeric Value".

You can not load S2P files with my software.  Well, you can try but it will ignore the data beyond S11.  It will also strip the first five lines no matter what.  It also only supports one mode (not sure which but I suspect dB).  Again, it is VERY ridged and was added for my own testing, not as a generic viewer for the general user.  That's why I never demo'ed it or document it.   Even if you had a file that met all the criteria,  it can only load it into memory.  That means you can't run any math on it.  You can only view the data.   It's virtually a useless feature for everyone but myself.   Of course, the next release may change that. 


Also, from the other feedback, I may add the ability to not overwrite the autoscale when in the rectangular modes.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1355 on: November 05, 2021, 01:03:49 am »
The new software is now available.

Auto regional support for Touchstone files
Touchstone file import
Able to manually turn off the vertical autoscale on the main graph for all rectangular plots
Fix a major bug in the stability circles
 
The following users thanked this post: croma641, Kean

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1356 on: November 05, 2021, 08:56:01 am »
Thanks for NanoVNA channel isolation plots.
Considering Jan's VNA (LibreVNA), the dynamic range fades above 3 GHz probably due to HW or components RF leakage, or presence of higher-order EM modes. It's still unclear how to get rid of this effect, this  might need a partial PCB or HW redesign.
While it had been reported by some NanoVNA users previously, that RF (ferrite) absorbing sheets may help to improve the channel isolation, this seems to have insignificant effect in Jan's VNA case. I had tried some special RF absorbing materials, but couldn't see any improvements in DR.
« Last Edit: November 05, 2021, 10:32:22 am by Alextsu »
 
The following users thanked this post: croma641

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1357 on: November 05, 2021, 03:21:19 pm »
They may not implement the leakage coefficient.  I added support for it after purchasing the V2+.   Initial tests showed poor dynamic range.  OWO had chimed in and suggested adding it.   Normally you would not use this term as it causes more harm than good but with the V2+ we see a fairly decent improvement above 3GHz.  Looking at your entire set, you can see really see the contrast.  It looks like they filter the data differently above 3GHz. 

Too bad they didn't use the same protocol as one of the other VNAs.  They could have used some of the preexisting software to test with.   

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1358 on: November 05, 2021, 08:36:15 pm »
They may not implement the leakage coefficient.  I added support for it after purchasing the V2+.   Initial tests showed poor dynamic range.  OWO had chimed in and suggested adding it.   Normally you would not use this term as it causes more harm than good but with the V2+ we see a fairly decent improvement above 3GHz.  Looking at your entire set, you can see really see the contrast.  It looks like they filter the data differently above 3GHz. 
Interesting solution.
Do You mean some extra maths is used while performing calibration?

Too bad they didn't use the same protocol as one of the other VNAs.  They could have used some of the preexisting software to test with.
In general, Jan's VNA has a built-in SCPI server, and its SCPI communication protocol is described in details in the "programming guide".
Makes it possible to integrate with other programms
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1359 on: November 05, 2021, 09:29:44 pm »
Interesting solution.
Do You mean some extra maths is used while performing calibration?

Yes.   

http://emlab.uiuc.edu/ece451/appnotes/Rytting_NAModels.pdf


In general, Jan's VNA has a built-in SCPI server, and its SCPI communication protocol is described in details in the "programming guide".
Makes it possible to integrate with other programms

It's not been too much effort to interface with these custom one-off protocols using LabView.  I like the simple interface of the V2Plus and hope they just expand on that for the V3 (assuming that they ever produce it).   Some of my older TE uses SCPI over GPIB.       

I have not looked into any of the manuals for your VNA.  It's hard to believe that it would be as complicated as that vintage PNA I bought.  There's a lot going on in that system.   Still LabView makes easy work of it for the most part.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1360 on: November 06, 2021, 12:12:34 am »
Glancing through the manual for your VNA,  it appears that they have given you a way to hook into their software but not directly run the VNA.  Surely they wouldn't do that but that's what it seems like.   So you can basically automate the VNAs controls but you use their software to collect and display the data.  If this is what they have done, why?   

Maybe there is another manual beyond the SCPI Programming Guide that provides lower level details to directly interface with it. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1361 on: November 06, 2021, 12:32:40 am »
I had started to upload the new software untested but decided to spend some time checking the V2Plus release.   Both are now up on Github but I have not tried the software for the original NanoVNA.  The changes were minimal and it uses the same code base but you never know. 

To turn off the autoscale just right click on the scale you want to turn off, then select AutoScale Y.   You can then select the max or min value and overwrite them with what ever you want.   To enable the autoscale, just re-select the AutoScale Y.   For transmission, you can turn off both the gain and the phase independently.   When you change the function, the software will automatically revert to autoscale.   This is transparent for me but gives those of you who want it, a way to disable it.
 
The following users thanked this post: ON7CH

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1362 on: November 06, 2021, 07:58:57 pm »
A few bugs were found in both programs.  These have been corrected and TDR has been added to the post processing.
 
The following users thanked this post: croma641

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1363 on: November 09, 2021, 05:39:03 am »
Glancing through the manual for your VNA,  it appears that they have given you a way to hook into their software but not directly run the VNA.  Surely they wouldn't do that but that's what it seems like.   So you can basically automate the VNAs controls but you use their software to collect and display the data.  If this is what they have done, why?   

Maybe there is another manual beyond the SCPI Programming Guide that provides lower level details to directly interface with it.
Yes, You are correct.
There are no other manuals available.
« Last Edit: November 13, 2021, 10:02:29 am by Alextsu »
 

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1364 on: November 13, 2021, 10:33:32 am »
A few bugs were found in both programs.  These have been corrected and TDR has been added to the post processing.
While performing some simple tests with SW NanoVNA v2+4 rev.2.07, trying .s2p file import test, I see that a small bug with Stability Circles plots still remains.
The Stability Circles plots at Main tab differs from the same plots at Advanced-2 port - Stability tab for S11 plot.
I have tested calculation with RF Assistant app with provided FHX13X .s2p file.
While Stab. Circles plots at Main tab in Your app appear to be correct, the yellow circle at Advanced tab for S11 differs from the pink one at Main tab graph
« Last Edit: November 13, 2021, 10:38:01 am by Alextsu »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1365 on: November 13, 2021, 03:36:57 pm »
A few bugs were found in both programs.  These have been corrected and TDR has been added to the post processing.
While performing some simple tests with SW NanoVNA v2+4 rev.2.07, trying .s2p file import test, I see that a small bug with Stability Circles plots still remains.
The Stability Circles plots at Main tab differs from the same plots at Advanced-2 port - Stability tab for S11 plot.
I have tested calculation with RF Assistant app with provided FHX13X .s2p file.
While Stab. Circles plots at Main tab in Your app appear to be correct, the yellow circle at Advanced tab for S11 differs from the pink one at Main tab graph
Good to see you testing it.   I had validated the stability circles using that Touchstone file I supplied from that Youtube video I linked.   Of course that works.  The problem was I had forgotten to add the index to all of the parameters.  In the case of the YT file, there are only two entries and both are the same.  So the missing index caused no problems.

These are the changes planned for 2.08: 

2.08
Add distance units to the TDR graph
Add threshold selection to TDR graph using cursors
Throttle time between calculations
Add missing index for stability circle parameters
Add a plot refresh to stability selection
Force states of gain and phase selection to defaults when selecting stability

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1366 on: November 13, 2021, 03:43:46 pm »
FYI,  I had noticed that a new group has been added.   

https://groups.io/g/liteVNA

liteVNA - 6GHz vector network analyzer in the same size as NanoVNA.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1367 on: November 13, 2021, 04:55:04 pm »
Both programs have been updated and are now available. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1368 on: November 13, 2021, 09:50:58 pm »
Using the V2 Plus 4 to sweep the home made Vivaldi antenna.

 
The following users thanked this post: croma641

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1369 on: November 14, 2021, 01:31:38 am »
Sweeping the same antenna with 4 data points vs 720.   With it using the CW mode, we only need one data point.  So sweeping 720 angles only requires a few minutes.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1370 on: November 14, 2021, 06:18:32 am »
The yellow and purple are the same setup, both with 1440 data points.  Each data point is an average of 51 samples.   The yellow trace is with me in the lab causing all sorts of reflections.   I left for the purple.  The blue is two bent wires to form a dipole.   No attempt was made to tune it. 

The second set of plots it the same untuned wire dipole but operating 1.5, 2.4 and 3GHz.   I would need to make up some sort of mechanical fixture as there is a lot of play.
 
The following users thanked this post: ON7CH

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1371 on: November 14, 2021, 12:33:02 pm »
FYI,  I had noticed that a new group has been added.   

https://groups.io/g/liteVNA

liteVNA - 6GHz vector network analyzer in the same size as NanoVNA.
This is a new gen of V2 with enhanced DR & freq. limits, a new V2 design from Hugen.
Still this is not a full 2-port, one direction only.
It should be compatible with old V2 & V2+ in terms of communication protocol.
So possible it would work with Your SW.
It's FW code is written & compiled by DiSlord.
------------
« Last Edit: November 14, 2021, 12:42:46 pm by Alextsu »
 

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1372 on: November 14, 2021, 01:21:21 pm »
New version shows much better performance for stability graphs, thanks!
Sorry for the lame question, what's the meaning of yellow circles plotted around S11 & S22 traced shown at Advanced Tab for Stability?
« Last Edit: November 14, 2021, 02:01:48 pm by Alextsu »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1373 on: November 14, 2021, 02:38:51 pm »
I did finding their site where you can DL the manual for the new LiteVNA.  Maybe someone will benchmark it against the others.   
https://zeenko.tech/litevna?spm=a2g0o.detail.1000023.1.b5a97ff8tHYEOr

Yellow are the mapping circles.
 
The following users thanked this post: msliva

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: NanoVNA Custom Software
« Reply #1374 on: November 14, 2021, 02:53:56 pm »
New version shows much better performance for stability graphs, thanks!
Sorry for the lame question, what's the meaning of yellow circles plotted around S11 & S22 traced shown at Advanced Tab for Stability?

Edited :-DD

I take it you found the problem.  The Texan's software shows both MS and MAX.  You have to look careful to see the MAX.   Of course when K<1, GMAX will become NaN.    If you look in the manual, you will see I ran into some problems with GMAX where two papers I found both had different errors in their equations.    I had to turn to a text book to find the correct equation.
« Last Edit: November 14, 2021, 04:13:50 pm by joeqsmith »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf