Author Topic: NanoVNA Custom Software  (Read 465030 times)

0 Members and 1 Guest are viewing this topic.

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1525 on: January 02, 2022, 03:01:55 pm »
The last book I purchased was not helpful.  While Dunsmore's book dedicates a chapter to calibration and error correction, Bonaguide & Jarvis have only a few pages.    Both books would make a very good reference and I wish I had them when I was first introduced to a VNA.

As I already said in a private mail, I have it on my to do list to check Michael Hiebel's book ("Fundamentals of Vector Network Analysis", the German version from 2006 is titled "Grundlagen der vektoriellen Netzwerkanalyse").
This book does not cover the Unknown Thru method in details, as well.
Only basic information is provided
 
The following users thanked this post: rf-messkopf

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1526 on: January 02, 2022, 07:30:09 pm »
The last book I purchased was not helpful.  While Dunsmore's book dedicates a chapter to calibration and error correction, Bonaguide & Jarvis have only a few pages.    Both books would make a very good reference and I wish I had them when I was first introduced to a VNA.

As I already said in a private mail, I have it on my to do list to check Michael Hiebel's book ("Fundamentals of Vector Network Analysis", the German version from 2006 is titled "Grundlagen der vektoriellen Netzwerkanalyse").
This book does not cover the Unknown Thru method in details, as well.
Only basic information is provided

I suspect rf-messkopf was spot on when they wrote me about there being a market gap and it only being important to a handful of vendors and researchers.   I certainly fall into that category of just using the functions implemented in the VNA firmware.  The only tiny difference is that from starting out with such an old relic as the 8754A, there was no firmware which forced me to learn some of the basics. 

For the square wave drive, from W2AEW's comment "They do appear more and more sinusoidal above 1GHz. ",  using my old 1989, 68000 VME chassis LeCroy 7200,  I dug out a 720k floppy and sneaker net the data to the PC using CERNs software.   I wasn't sure if my USB floppy drive would read it, but no problem.   Shown is the output from the LiteVNA at 1.2GHz.  Not bad for a 32 year old scope.   :-DD

https://service-hpglview.web.cern.ch/service-hpglview/
 
The following users thanked this post: realfran

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1527 on: January 04, 2022, 02:27:40 am »
...
To get rid of the assumption of a constant port match, commercial VNAs then transform the 8-term model to the conventional 12-term model (which is usually only a 10-term model by neglecting the crosstalk error terms which also do not exist in the 8-term model). The 12-term model has separate source and load port match errors for each direction. This of course, due to the larger number of unknowns, requires additional measurements: the switch terms.

The switch terms are defined as the ratio of outgoing wave and the incident wave at one port, while the other port is configured as a source. Notice that a three receiver VNA has no way of measuring them. On four receiver VNAs they are usually measured along with the thru.

...

The switch terms only depend on the test set and should not vary much over time, at least in commercial lab grade VNAs. I have checked that with my VNA, they seem to be indeed very stable.

I have included a snip from Agilent's patent 7,019,536 B1 which talks about the switch errors.     

To start, I have attached the transfer relay to the LiteVNA.   I then calibrated the unit over a range of 1-300MHz using the ideal standards and 12-term model.  After which I inserted the T-check and saved the Touchstone and calibration files.   Next I made a simple wrapper for the LabView files I sent you   allowing  me to run some basic checks without the VNA.   I have included a the snip of the switch error terms.

Also shown is a plot of the two switch terms.   

Again, I am totally clueless and there could be a lot of errors in what I have shown and the path I took for this first step.

****
It may not be clear but the reason for collecting the data for the T-Check is I expect to be able to switch from the 12-term error model to the unknown thru and get roughly the same result with it inserted.   
« Last Edit: January 04, 2022, 12:16:00 pm by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1528 on: January 04, 2022, 02:43:39 pm »
Two different Agilent patents vs Dunsmore's book.

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1529 on: January 04, 2022, 10:46:26 pm »
nanoVNA-QT use libxavna

inside i found:
        if(matchedThru)
            return "Unknown thru calibration using 3 fully known one port standards"
                    " and a reciprocal thru standard. Thru standard must have "
                    "an electrical delay between -90 and 90 degrees, should be "
                    "well matched (or as short as possible), and have less than 10dB of loss. "
                    "Matching error of the two instrument ports is fully removed.";

So you can try research used Unknown thru calibration
https://github.com/xaxaxa-dev/vna/blob/master/libxavna/calibration.C
 
The following users thanked this post: joeqsmith, realfran

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1530 on: January 05, 2022, 12:07:18 am »
Using my test code, I tried to isolate where my problem/s are.   I suspect at least one of my problems is this one sentence from that patent.   If I use the ETF/R from the 12-term model,  I get something close to what I would expect.   

Not being skilled in the art or understanding it, coupled with errors in the various papers....   It's not all between the keyboard and chair.   

Offline rf-messkopf

  • Regular Contributor
  • *
  • Posts: 156
  • Country: de
  • Mario H.
    • Homepage
Re: NanoVNA Custom Software
« Reply #1531 on: January 05, 2022, 02:08:32 am »
Two different Agilent patents vs Dunsmore's book.

I've only been briefly looking again at Section 3.2.3 in Dunsmore's book, but the notation there seems to be consistent, and I cannot spot an obvious error in the equations.

The E00, E01, E12, E11 are the error terms of the error box at port 1 of the 8-term error model, and E22,, E23, E32, E33 of the error box at port 2, see Figure 3.3. When you want to convert from the 8-term model to the 10/12-term model, the load match errors are
\[
\begin{align*}
ELR&=E_{11}+\frac{E_{10}E_{01}\Gamma_R}{1-E_{00}\Gamma_R}=E_{11}+\frac{ERF\cdot\Gamma_R}{1-EDF\cdot\Gamma_R},\\
ELF&=E_{22}+\frac{E_{32}E_{23}\Gamma_F}{1-E_{33}\Gamma_F}=E_{22}+\frac{ERR\cdot\Gamma_F}{1-EDR\cdot\Gamma_F}.
\end{align*}
\]
That is simply equations (3.8 ) together with equation (3.11) and (3.12). So it is all there in Section (3.2.3) to convert between the 8-term and the 10/12-term model. Also, the conversion from the 10/12-term model to the 8-term model is spelled out explicitly, see equations (3.13) to (3.16).

The only notational glitch I see in that section is that Dunsmore switches between, e.g., \$E_{LF}\$ and \$ELF\$, etc., in equations (3.14) to (3.16).

Edit: I should have pointed out that \$E_{11}\$ of the 8-term error model actually is equal to \$ESF\$ of the 10/12-term model. But that is a result, not just a notational oversight. Similarly, \$E_{22}=ESR\$. See equations (3.8 ).
« Last Edit: January 05, 2022, 03:00:22 am by rf-messkopf »
 

Offline rf-messkopf

  • Regular Contributor
  • *
  • Posts: 156
  • Country: de
  • Mario H.
    • Homepage
Re: NanoVNA Custom Software
« Reply #1532 on: January 05, 2022, 02:40:47 am »
Attached are plots of the two switch terms of my VNA. Directly measured, and not calculated from the 12-term model after a full two-port calibration.

No idea what they would look like on a nanoVNA or similar kit.
 
The following users thanked this post: realfran

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1533 on: January 05, 2022, 05:39:40 am »
Perhaps this Agilent paper can corroborate the Equations? Paper also details a 16-term correction.  Is that a useful improvement here?
 
The following users thanked this post: Mechatrommer

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1534 on: January 05, 2022, 01:04:30 pm »
Two different Agilent patents vs Dunsmore's book.

I've only been briefly looking again at Section 3.2.3 in Dunsmore's book, but the notation there seems to be consistent, and I cannot spot an obvious error in the equations.

The E00, E01, E12, E11 are the error terms of the error box at port 1 of the 8-term error model, and E22,, E23, E32, E33 of the error box at port 2, see Figure 3.3. When you want to convert from the 8-term model to the 10/12-term model, the load match errors are
\[
\begin{align*}
ELR&=E_{11}+\frac{E_{10}E_{01}\Gamma_R}{1-E_{00}\Gamma_R}=E_{11}+\frac{ERF\cdot\Gamma_R}{1-EDF\cdot\Gamma_R},\\
ELF&=E_{22}+\frac{E_{32}E_{23}\Gamma_F}{1-E_{33}\Gamma_F}=E_{22}+\frac{ERR\cdot\Gamma_F}{1-EDR\cdot\Gamma_F}.
\end{align*}
\]
That is simply equations (3.8 ) together with equation (3.11) and (3.12). So it is all there in Section (3.2.3) to convert between the 8-term and the 10/12-term model. Also, the conversion from the 10/12-term model to the 8-term model is spelled out explicitly, see equations (3.13) to (3.16).

The only notational glitch I see in that section is that Dunsmore switches between, e.g., \$E_{LF}\$ and \$ELF\$, etc., in equations (3.14) to (3.16).

Edit: I should have pointed out that \$E_{11}\$ of the 8-term error model actually is equal to \$ESF\$ of the 10/12-term model. But that is a result, not just a notational oversight. Similarly, \$E_{22}=ESR\$. See equations (3.8 ).

I suspect the sprinkling of dots is an oversight but the use of terms changes for each revision.  I  tend to agree that Agilent had at least two patents that have errors.   

Maybe today I can figure out some of the art not covered by the book or the patents....

***
Actually, looking at the page you sent, your equation 3.31 is 3.36 from my copy (second edition). 
« Last Edit: January 05, 2022, 01:15:26 pm by joeqsmith »
 
The following users thanked this post: realfran

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1535 on: January 09, 2022, 01:58:06 pm »
Yes with the new firmware Dislord has improved a lot the LiteVNA, I hope John resolve this important equation for the calibration on V3 software.
If test the new FW the noise is reduced successfully in the HI part of the frequency range.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1536 on: January 09, 2022, 04:57:23 pm »
Sorry but I've had no luck getting the unknown thru to work.   I've thought about writing out the steps I took in layman's terms but based on the lack of responses, I doubt it would be helpful.  I've reviewed the patents and code with a few friends but it's the blind leading the blind.  The attached shows the latest software used to exorcise the calibration algorithms.   The software imports the calibration and uncalibrated touchstone files.   We can then run them through the 12-term or the unknown thru and compare the results.

I have not done any more with the Lite's new firmware as I wasn't sure where Dislord was storing it.   Now that we know that it defaults to a average where the V2Plus4 does not, it explains why it is slower and the noise may look better than what it is.   If you wanted to compare the two, you would need to consider these differences.   I also never figured out where the official archive was located.  So if I wanted  to reinstall the firmware that was shipped with the unit, today, I can't.     


Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1537 on: January 09, 2022, 05:43:46 pm »
Last official soft here (contain last official soft and fw):
https://zeenko.tech/litevna

My test blog on:
https://groups.io/g/nanovna-beta-test/topics

last week i also work under calibrations. Add calibration standard support (for OPEN C0,C1,C2,C3, delay, for SHORT L0,L1,L2,L3, delay, for LOAD Z0, L and C, delay, for THRU delay), not added only offset loss (due to difficult calculation for device, need use sqrt and lot of calculations) i think this not critical. I good optimize calculation and now all work in realtime.

Interesting know how you calibrate thru (i add ISOLN measure for correction, this give more good results)

Here my 70dB measure in Lite to 6.4GHz after changed calibtration alghoritm (look not bad i think, measure ~linear)
Also now i can see difference 90 (red) and 100dB (blue) attenuators on measure to 3GHz
Added work on harmonic, allow see to ~8-9GHz (yes dynamic on 8GHz not good, but possible see something)
One user test hi freq filters (see attach)
« Last Edit: January 09, 2022, 05:59:01 pm by DiSlord »
 
The following users thanked this post: Mechatrommer

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1538 on: January 09, 2022, 06:03:23 pm »
Last official soft here:
https://zeenko.tech/litevna

You already provided that link.  I was asking about where the archive (older releases) and the code you are working on (pre-release) are stored.   The official release has no documentation to tell users what has changed.  When you suggest you have corrected a problem, I would have no way to know if it was released or not. 

***
My test blog on:
https://groups.io/g/nanovna-beta-test/topics

Thanks for adding that link. 
« Last Edit: January 09, 2022, 06:07:34 pm by joeqsmith »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11648
  • Country: my
  • reassessing directives...
Re: NanoVNA Custom Software
« Reply #1539 on: January 09, 2022, 06:42:36 pm »
Last official soft here:
https://zeenko.tech/litevna
still using peculiar BMP format.. i still read BMz and BGR tag in hex editor... i've provided standard format if its compatible to you in that thread... i'll be happy if you can still make it compatible to me, but i understand its not a compulsion to fulfill my request, thanks to you anyway. https://www.eevblog.com/forum/testgear/hugen-litevna-64-6-3ghz/msg3928667/#msg3928667
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1540 on: January 09, 2022, 08:25:21 pm »
This test FW works well on PC software (the averaging slow the process but work)
Dislord test blog on:
https://groups.io/g/nanovna-beta-test/topics
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1541 on: January 10, 2022, 12:30:11 pm »
This test FW works well on PC software (the averaging slow the process but work)
Dislord test blog on:
https://groups.io/g/nanovna-beta-test/topics

It appears they kept the list private for some reason.  I'll pass.  Hopefully they will improve the official release area to inform customers of the changes. 

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1542 on: January 10, 2022, 01:50:25 pm »
Hello Jhon, Dislord sends you the list of addresses you can join to the beta tester, seam to me one person with your experience is beneficial for all.
Best regards.
Francesco.
 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1543 on: January 10, 2022, 03:30:02 pm »
My changelog for NanoVNA code.
LiteVNA use some code as H / H4 (not depended from hardware) after v1.0.69
Last v1.2 not finished (all work under calibrations) - so no change log yet

Also my github contain all changes for H/H4 (i also use this code for build fw for V2 / V2Plus / V2Plus4 / LiteVNA)
https://github.com/DiSlord/NanoVNA-D

PS thanks HA3HZ
« Last Edit: January 10, 2022, 03:44:01 pm by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1544 on: January 10, 2022, 03:59:08 pm »
Hello Jhon, Dislord sends you the list of addresses you can join to the beta tester, seam to me one person with your experience is beneficial for all.
Best regards.
Francesco.
I never wrote a regression test to support this protocol.  Unlike the firmware supplied with my original NanoVNA, the firmware for the V2Plus4 was stable enough to use from the start.   

Because I use the PC to control the VNAs, I have little use for the majority of the features being added to the firmware.  I don't have a need for the display, buttons, switches and CF card.   As long as the firmware is stable and able to send raw data, that's really about all I need.  I view any changes that break the backward compatibility with the V2Plus4 a detriment.   Today the Lite is slower than the V2Plus4 are requires I increase my timeouts.   This may have been from the added averaging that is enable by default.   Turning off the average may increases the data rate but I am not sure if that causes other problems where a user may be expecting the V2Plus4's sample rate.  Certainly none of this is a problem for the antenna analyzer group.

If I ever sort out my calibration problems, I will download the latest firmware for the Lite and test it with my software before I make a release. 

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1545 on: January 10, 2022, 05:10:17 pm »
Thank you for the explication. :-+
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1546 on: January 10, 2022, 11:43:31 pm »
I attempted to carve out a simple bandpass stub filter with a center freq of 6.4GHz just to see if the Lite would show anything reasonable.  Shown without any calibration or normalization.   Looks almost too good.   
 
The following users thanked this post: croma641, realfran

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1547 on: January 11, 2022, 10:25:27 pm »
On the V.3, there is the possibility of averaging? I see it on the screenshot. I use the Lite-VNA with PC, my interest is to get maximum function on the computer, portability is not in my interest. The main interest characterizes filters, stub, and passive components.
 I get some line Stretcher from Hirose I like to learn to use I don't find a lot of information on the application, they sed can use for impedance adapter, phase shift etc. but not practical examples of application.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1548 on: January 11, 2022, 10:56:40 pm »
I mentioned the average feature here:
https://www.eevblog.com/forum/rf-microwave/nanovna-custom-software/msg3895409/#msg3895409

Asking a practical use for a phase trimmer may be like asking a practical use for a resistor or any other component.   I did show one in a recent video:
https://youtu.be/dI2LjW_joXA?t=41

Here I am using one as part of my jitter measurements:


 
The following users thanked this post: croma641

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11747
  • Country: us
Re: NanoVNA Custom Software
« Reply #1549 on: January 14, 2022, 02:37:32 am »
 
The following users thanked this post: croma641


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf