Author Topic: NanoVNA Custom Software  (Read 535970 times)

0 Members and 4 Guests are viewing this topic.

Offline N2CUA

  • Newbie
  • Posts: 9
Re: NanoVNA Custom Software
« Reply #250 on: September 07, 2019, 01:34:40 am »
Are you saying asking to pay for service is " Badgering " ?

More importantly, its a waste of your time to even try .. lol
 :-DD
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3495
  • Country: us
Re: NanoVNA Custom Software
« Reply #251 on: September 07, 2019, 01:37:42 am »
I'm quite in awe of the nanoVNA.  @erik on the groups.io list has added an arbitrary scan function that will return a series of samples of arbitrary length and sampling via the console.  So a piece of cake to write a simple script to pull data off the nanoVNA, correct it and plot it with gnuplot.  Gnuplot will produce publication quality figures, so that's not shabby even if it's not the instant gratification that so many demand today.

A GUI such a @joeqsmith wrote is a *lot* of work.  Just designing the window layout takes weeks of work. But reading a bunch of numbers from the serial port and graphing them is not much trouble.  If someone is not willing to learn to do that I don't have much sympathy.

The audio codec chip has a unique 96 bit ID.  So it would be easy to sell 3rd party software for the nanoVNA which was locked to a particular device.  Of course, if your device dies, then so does your software license.  And realistically, such SW would cost more than the HW.  Is it likely that a $200 software package for a $35 device is a viable commercial venture?  I very much doubt it.  But once you have sold *one* copy you're stuck with the support problem or a lot of bad mouthing for not working for pennies per hour.

After putting $100K in labor into developing a seismic processing program I abandoned attempting to sell it because it because it quickly became apparent I was going to have to do $10K in free consulting to do an on site demo.  No guarantee of a sale and no way to get paid for configuring a Beowulf cluster for the demo  in 1999 when not many people knew how.

Personally, I think that the nanoVNA should be pure OSSW/OSHW.  If I were to develop the sort of software @joeqsmith has, I'd design HW with more dynamic range once I had the software done.  If you do the HW first, you risk it being obsolete before you finish the SW.  Over 90% of the software is completely HW agnostic.

Reg
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 7088
  • Country: ca
Re: NanoVNA Custom Software
« Reply #252 on: September 07, 2019, 02:29:16 am »
I have no connection with @joeqsmith.  I've never even watched his YouTube videos.  I just wandered in here because I bought a nanoVNA and have been sucked into a black hole.  I have 20+ years of software support experience.

Badgering him like this is completely unreasonable. 

If you want the sort of software that @joeqsmith is playing around with, buy a VNWA or learn to program.  Tom Baier spends a *lot* of time providing support for his software.  You only need to read the VNWA mailing list to see how much work it is.  A staggering amount of the traffic on the VNWA list is trying to help people who did not read the manual, do not know anything about using a VNA and often very little about RF.  Yes, it is 10x the price, but it's also more capable.  However, very little of that is the hardware.  It's mostly the cost of the software support.

There are plenty of people working on open source programs for the nanoVNA.  As @joeqsmith suggested, give them some money.  Or learn to program and help out.  Join  nanovna-users@groups.io.

In any case, @joeqsmith is not responsible for your lack of ability.  He chose to invest his time and money in learning how to do something.  Those who are able are not the slaves of those who are not able.

Reg

Sorry what is the point of posting about a software but not making it available? I genuinely do not understand, can someone explain.
Facebook-free life and Rigol-free shack.
 
The following users thanked this post: KD0CAC John, horo

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: NanoVNA Custom Software
« Reply #253 on: September 07, 2019, 02:50:03 am »
Sorry what is the point of posting about a software but not making it available? I genuinely do not understand, can someone explain.
Have I been following a different thread? I have never done much RF and I did get myself a nanoVNA and I have been finding joeqsmith's posts absolutely brilliant.

The graphics stuff is the glitzy fluff. The principal thing is the nanoVNA is a measurement device that outputs a list of measurements via USB serial interface. joeqsmith has shown us what you can do with the measurements that the nanoVNA is capable of. An incredible series of posts.

You do not even need to build your own graphical program - you can do anything joeqsmith did with fairly simple python scripts and you could output to a csv file or similar. Perhaps then number crunch in a spreadsheet if you want.
« Last Edit: September 07, 2019, 03:10:03 am by amspire »
 

Offline radioactive

  • Regular Contributor
  • *
  • Posts: 173
  • Country: us
Re: NanoVNA Custom Software
« Reply #254 on: September 07, 2019, 03:10:59 am »
Just another option for those that might prefer Java to hack on.  It is a hack job, but it works on Linux for me.  It should also work on Windows, Mac.
https://github.com/tvelliott/jNanoVNA
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11843
  • Country: us
Re: NanoVNA Custom Software
« Reply #255 on: September 07, 2019, 05:05:14 am »
Sorry about the drama.   

With a lack of torque wrench data and it being fairly common for me to see suggestions that torquing is not required, I thought I would have some fun.   My goal was to see how repeatable I could hand tighten an SMA.    As it turns out, I just don't have the knack and was unable to fool the $50 Nano.   Well, not at 4.75 to 5.0GHz anyway.    :-DD

The first 1200 or so sweeps where I am not moving anything,  it seems to be fairly stable. 

If you look at the second set of data, this is 2X 1206 resistors, of course the cal was done with the home made standards that use 1206 parts.  There are a slew of other problems.  So, just to be clear, I am not even remotely suggesting that the data has any meaning or that there is any point to what I am doing beyond my own amusement.

While sorting out some of my junk to put this test together, I came across my old transfer relay I mentioned.   I'm fairly certain that this came from the test set for my old HP VNA.   

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #256 on: September 07, 2019, 05:15:46 am »
There is a good open source VNA GUI here that I will be porting to the NanoVNA (most likely only NanoVNA V2 which will have a more capable command interface): https://github.com/xaxaxa-dev/vna/tree/master/vna_qt

I have also fed back the tip about the STM32F303 and most likely V2 will come with a F303CCT6 by default (most likely a GD32).

EDIT: fix typo
« Last Edit: September 07, 2019, 05:17:19 am by OwO »
Email: OwOwOwOwO123@outlook.com
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11843
  • Country: us
Re: NanoVNA Custom Software
« Reply #257 on: September 07, 2019, 05:20:52 am »
joeqsmith ,
I may have missed it , but do you provide a PAID service .

I do not.   Anything I offer in the way of videos, test data and other information is for free as my way of giving back to the community and promoting the hobby.   

If you were serious about hiring me, in all honestly I would suggest you pick out what ever top of the line Keysight, RS or any other brand you like.  Don't hold back.   The sky's the limit.  In the end you will have a very nice system, and be much further ahead.   

Offline 5q5r

  • Contributor
  • Posts: 31
  • Country: dk
Re: NanoVNA Custom Software
« Reply #258 on: September 07, 2019, 06:18:15 am »
Just to reiterate, for those who might not have seen it: Myself and others have made a Python program for doing a number of the same things as Joe's software, fully open source and available to use and modify. It's available here: https://github.com/mihtjel/nanovna-saver

There are pre-built releases for Windows - for other platforms, download the code and run it using Python.

All potential contributors are very welcome to contact me directly, and requested features are pushed onto the project TODO list, from which I grab items to work on.

I hope this provides some use for members of the community.
 
The following users thanked this post: Roland_W, horo

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3984
  • Country: ua
Re: NanoVNA Custom Software
« Reply #259 on: September 07, 2019, 06:40:47 am »
if I understand correctly, TDR can be obtained by make IFFT applied to S1P. Is it correct?

It seems that it works, but the most confusing thing here is how to calculate proper time for points.  ???

Here is 0.5 meters RG316 with open end, measured with NanoVNA (it's real back and forth delay is about 0.495 ns):
828753-0

Here is 10 meters RG316 with open end, measured with NanoVNA (don't know it's real delay, but 98.4 ns looks very close to velocity factor 0.66):
828759-1

It shows signal magnitude after IFFT. Don't take attention to ST/ED/BW values on screenshot, these are rudiments from debugging :)

Is it correct way?  :phew:

Is it possible to calculate impedance instead of this unknown unit magnitude?
« Last Edit: September 07, 2019, 06:53:57 am by radiolistener »
 
The following users thanked this post: nali

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3984
  • Country: ua
Re: NanoVNA Custom Software
« Reply #260 on: September 07, 2019, 08:29:00 am »
Here is more interesting measurement :)

SMA => 0.5 meters RG316 => SMA to PL adaptor => 1 meter LMR195 => PL to BNC adaptor => 1 meter RG58 => BNC to SMA adaptor => OPEN:

Red = magnitude
Green = re
Blue = im

828798-0

The same with 50 Ohm load at the end:

828804-1

It seems that these Chinese SMA-PL and PL-BNC adapters are crap  :D


Any idea on how to convert this magnitude into impedance value?
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1762
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #261 on: September 07, 2019, 11:11:32 am »
Hi,

Yesterday I had a bit time and started my "VMA NanoVNA Tool".

At this point it does not much and is of little use, except that it allows to export the data to Excel as a *.CSV file.

It may have bugs and does not look nice at all, but you can just run the executable and get your CSV file. No installation, no garbage files and no garbage on the Registry.

The reason I am uploading it here is to get some feedback on this eternal question of mine: "What is wrong with the supplied NanoVNASharp software?"

To me that software looks just fine and implements all graphs (mine does not do it correctly at this moment). The only thing it does not do, is to export data in CSV format for further Excel work. Would adding this feature solve the demand for alternative software (at least for most people)?

I understand that joeqsmith did his software because he did not like the graphics and refresh rate of NanoVNASharp. Plus he is free to do whatever he likes! :)

But what I really would like to understand and I have asked and got no reply (I know, I am dumb): what other functionalities do you guys want/need?

Also, the issue I have in further developing my software is that I simply have not understood VNA measurements: what do you read out of the charts and why and what else you would want to calculate based on the data. I only figured out the tuning of antennas. Reading the posts leaves me with many questions and, shame on me, I have not fully watched/rewatched joeqsmith great videos, due to total lack of time (I have been busy implementing a full error map compensation algorithm to my "VMA Simple Spectrum Analyzer" software).

Regarding the much discussed open source, freeware, shareware, what so ever:

1) If I was to develop my software further up to a level where no doubts you would prefer it over NanoVNASharp, then I would apply the same kind of licensing scheme as I have currently on my "VMA Simple Spectrum Analyzer" software. It will never be open source and not freeware, either. Except these initial versions which really don't add much to what already exists.
2) I don't believe in giving away work for free. Work done for free is, in my opinion and as the name implies, worthless. My work has a value, at least to me.
3) There is a lot of work and time involved in any of these developments. Based on my "VMA Simple Spectrum Analyzer", I can confirm that there are literally hundreds if not thousands of hours spent in development. Note that development is not only time spent typing code, but countless hours thinking on how to solve a particular problem. Add to this the years spent learning how to program, how to use (in this example) spectrum analyzers, development of actually new measurements and functionality. On top of this the money spent in equipment: in order for me to develop a spectrum analyzer software, I have actually purchased different spectrum analyzers (SSA3021X, R&S CMU200, R&S CRTU, HP8594E, HackRF One, ADALM Pluto, SMA, D6, LTDZ, ...)! So, indeed, there is a lot of investment involved, even if this is a non-profit hobby. Other than Flynt said "It would have cost you nothing" - it DID COST A LOT!!! Of course, replicating an executable on a computer does not cost much. But then, why doesn't Microsoft give free copies of their software? THAT would not cost anything, right: just making the software available for download? Or, wait a moment: it would cost them all the ROY and profit! Not being able to recognize the COST of software development is indeed a problem and I fully support joeqsmith's decision.
4) The much discussed software of joeqsmith has a problem (to those asking for it - certainly not for him), by the way: It was developed with the HOME version of LabVIEW. This version, while affordable for hobby use, does explicitly not allow to use the resulting applications for any commercial use. Independently if joeqsmith is worried about this or not: if it was me, I would not make the software public, for the following reasons:
a) I could not prevent any organisation to download and use the software for commercial purposes, thus not complying with the LabVIEW terms. I *think* it would not be a problem for me, but anyhow, why risk something when there is no personal gain at all?
b) I could not sell or accept donations for the software, as this is against the LabVIEW terms. It means that I would have to give out the software for free.
c) This would mean that I would get no return for my work, but instead, Chinese sellers of cloned NanoVNA would include my software (without even asking) and make profit, while I would be left as the dummy handling all support issues - for free.

Kind regards,
Vitor
« Last Edit: September 07, 2019, 11:15:50 am by Bicurico »
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1762
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #262 on: September 07, 2019, 11:17:51 am »
Here is an example CSV file, generated with my software.

Regards,
Vitor

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1762
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #263 on: September 07, 2019, 11:22:19 am »
Here two pictures:

One of the software and one of Excel showing the graphs (not formatted, just a quick test).

Vitor

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3984
  • Country: ua
Re: NanoVNA Custom Software
« Reply #264 on: September 07, 2019, 02:07:51 pm »
Bicurico, S1P file already compatible with Excel. Just copy-paste. :)
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11843
  • Country: us
Re: NanoVNA Custom Software
« Reply #265 on: September 07, 2019, 02:53:01 pm »
Hi,

....
The reason I am uploading it here is to get some feedback on this eternal question of mine: "What is wrong with the supplied NanoVNASharp software?"

To me that software looks just fine and implements all graphs (mine does not do it correctly at this moment). The only thing it does not do, is to export data in CSV format for further Excel work. Would adding this feature solve the demand for alternative software (at least for most people)?

I understand that joeqsmith did his software because he did not like the graphics and refresh rate of NanoVNASharp. Plus he is free to do whatever he likes! :)

But what I really would like to understand and I have asked and got no reply (I know, I am dumb): what other functionalities do you guys want/need?

My only problem with the Sharp software was what I had shown with the cursors being unusable.  This was really the catalyst for where I am now.   

While my software has many basic features that you will find on most VNAs, these are a few that my current software supports that you may not find with Sharp:

  Support control of external bias power supply
  Support for an external transfer relay
  Full 2-port calibration
  Automatic T-check
  Automatically collect all four S-parameters
  Create full 2-port Touchstone files
  Segmented sweeps (both log and linear are supported)
  Record data for post processing over extended periods and there is some built-in post processing capability (3-D viewing, histograms, scatter....) 
  Supports external mixers and directional couplers using CH1 for S11
  Basic TDR measurements (time, distance, impedance, Beatty standard....)

I would like to point out that member RHB's posts did not fall on deaf ears.  It's an interesting topic.
https://www.eevblog.com/forum/rf-microwave/nanovna-custom-software/msg2668785/#msg2668785

...

4) The much discussed software of joeqsmith has a problem (to those asking for it - certainly not for him), by the way: It was developed with the HOME version of LabVIEW. This version, while affordable for hobby use, does explicitly not allow to use the resulting applications for any commercial use. Independently if joeqsmith is worried about this or not: if it was me, I would not make the software public, for the following reasons:

...

Kind regards,
Vitor

You had asked about this before:
https://www.eevblog.com/forum/rf-microwave/nanovna-custom-software/msg2599500/#msg2599500

I did not develop my software with the Home edition as you have stated.  If you look at screen shots or videos I have posted, the lack of a watermark should have been the tell tail.   There is nothing from a legal aspect that would prevent me from providing the software for profit as again, I have a professional license.    The software will indeed run on the Home edition.   It could be built into an EXE with an installer like any other application using the Home edition but using this for profit would be a licensing problem as you suggest.   

A pro license doesn't cost too much.  Somewhere around $3000.  If I were planing to use it for profit, I would just sort out the license costs as part of the sale price.   I wouldn't try and sell 3001 copies at $1.00 USD to make $1 in profit.   :-DD   Hope this clears things up. 
« Last Edit: September 07, 2019, 04:38:28 pm by joeqsmith »
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1762
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #266 on: September 07, 2019, 03:23:36 pm »
@joeqsmith: Sorry, I thought you were using the HOME version.

Anyway, I guess my thoughts still apply regarding the development of such software (or software to support other devices) using the HOME version of LabVIEW, which was discussed in a different thread.

But to stay on topic: I will now continue to monitor this thread and see if I can learn something about VNA measurements and see if this motivates me to continue developing the software.

@radiolistener: Thanks! It did not occur to me to verify that S1P files are actually just CSV files...
 
Regards,
Vitor

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #267 on: September 07, 2019, 05:06:37 pm »
FYI to anyone working on alternative software for the NanoVNA: it's a good idea to abstract out the hardware interfacing part of your code and separate it from your UI code because the command interface is going to be completely reworked in V2. It will be a more simple low level (and binary rather than text) protocol to improve performance and sweep rate. The other thing I know about V2 is it will cover at least 1 to 2500 MHz (without harmonic tricks). V1 is very noisy above 300MHz because of the use of the third harmonic and the SA612 mixer which both mean a very weak signal.
« Last Edit: September 07, 2019, 05:08:57 pm by OwO »
Email: OwOwOwOwO123@outlook.com
 
The following users thanked this post: horo

Offline edigi

  • Regular Contributor
  • *
  • Posts: 184
  • Country: hu
Re: NanoVNA Custom Software
« Reply #268 on: September 07, 2019, 06:23:02 pm »
What is the confidence level of this information?
Any expected date?

Actually harmonic usage is not that a bad idea, in fact I've checked with SA till 1.5 GHz and maybe even that could be used (at least for S11).
Mixer is definitely limiting (500 MHz by the spec if I remember correctly).
Also due to overdrive of the clock chip stability around 300 MHz is not the best, low battery is one issue but I could provoke it also with hair dryer (so summer high temperature can be also an issue; the 800 MHz code version is not there by accident...).

A more efficient data transfer is definitely a good idea even if it breaks compatibility with other devices (not an issue for me and probably for many but I heavily suspect that joeqsmith has not developed his SW only because of NanoVNA but probably same SW is used with other devices). A good compromise could be that the VNA could be forced back to the slower but more compatible mode but by default it could use a more efficient one.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11843
  • Country: us
Re: NanoVNA Custom Software
« Reply #269 on: September 07, 2019, 07:38:00 pm »
It will be a more simple low level (and binary rather than text) protocol to improve performance and sweep rate. The other thing I know about V2 is it will cover at least 1 to 2500 MHz (without harmonic tricks).

Very nice!!  I was very surprised to see them sending ASCII.   2.4GHz without the harmonics would be a very welcome addition as well.  Currently, I limit the sweep to 300MHz while playing around with mixing the signals.

A more efficient data transfer is definitely a good idea even if it breaks compatibility with other devices (not an issue for me and probably for many but I heavily suspect that joeqsmith has not developed his SW only because of NanoVNA but probably same SW is used with other devices).

I started out thinking I could port the code I wrote for my old HP but there were two problems.   First, I wrote the program many years ago and have learned better techniques over the years.   The other problem was the data format.   That HP has clear plastic overlays that attach to the CRT with the various scales, like polar and smith.  You would mark on these with your grease pencil with the data you collect  (primitive storage).    The data had to be translated through three different systems.  It was a real nightmare.    I did like the look and feel of the software and decided to follow that same sort of scheme.  I reused my graphics and the techniques I came up with for plotting the data but that's about it.   One day I would like to replace the old HP with something less than 20 years old  :-DD

https://www.amazon.com/COLOR-MARKERS-PEEL-OFF-GREASE-PENCIL/dp/B00XJ1FRRI?ref_=fsclp_pl_dp_7

Pictures of the 50 ohm home made standard with mixers drifting a bit.  Also shown is a 3.4GHz low pass, both compliments of the $50 Nano.    My confidence is about at that $50 level...  Maybe lower.

****

Playing with the scatter plot, 3.4GHz LP filter....

https://www.youtube.com/watch?v=F8bUZMEElyk&feature=youtu.be
« Last Edit: September 07, 2019, 08:41:06 pm by joeqsmith »
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3495
  • Country: us
Re: NanoVNA Custom Software
« Reply #270 on: September 07, 2019, 08:02:55 pm »
if I understand correctly, TDR can be obtained by make IFFT applied to S1P. Is it correct?

It seems that it works, but the most confusing thing here is how to calculate proper time for points.  ???

Here is 0.5 meters RG316 with open end, measured with NanoVNA (it's real back and forth delay is about 0.495 ns):
(Attachment Link)

Here is 10 meters RG316 with open end, measured with NanoVNA (don't know it's real delay, but 98.4 ns looks very close to velocity factor 0.66):
(Attachment Link)

It shows signal magnitude after IFFT. Don't take attention to ST/ED/BW values on screenshot, these are rudiments from debugging :)

Is it correct way?  :phew:

Is it possible to calculate impedance instead of this unknown unit magnitude?

The frequency spacing determines how long the time domain trace is.  The Nyquist frequency determines the sampling.  If you sweep to 900 MHz at 1 MHz spacing you have data for 1 microsecond.  If you pad the end of the frequency series to raise Nyquist to 2 GHz you will have 250 ps sampling.

Doing an FFT from time to frequency, padding with zeros and inverse transforming is the standard way to resample data to finer sampling rates.  There are other ways of doing it, but the FFT is the fastest.

I wrote an arbitrary resampling routine which would resample any sample rate to any other sample rate by FFT  around 20 years ago.  You have to pad the series so that m*dtT1 = n*dT2.  If you don't you will get a phase error near the end.  That cost me 2 weeks of misery to figure out.  It's clearly stated, "The DFT is defined on the semi-closed interval from [-Pi:Pi)."  But it's easy to overlook that little detail.

I've presented  some time domain connector testing here:

https://www.eevblog.com/forum/rf-microwave/testing-rf-connectors-and-cables/msg2640531/#msg2640531

using a Tek 11801 and 20 GHz SD-24 TDR head.

Chinese  SMA and N connectors are OK to about 1 GHz.  BNC males are often completely useless.  It's really a function of the tolerances on the make collar.

Have Fun!
Reg
 
The following users thanked this post: radiolistener, horo

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1762
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #271 on: September 07, 2019, 09:31:51 pm »
Hi,

I have the following question, which is probably obvious for you all, but not for me:

1) Port S11: Is it correct to assume that this port internally combines a TG, RF IN, DUT with a SWR bridge?
2) Port S21: Is it correct to assume that this port internally acts just as a TG?
3) Both TG and RF IN are synchronized, allowing for phase measurements, as opposed to SWR measurements carried out with a spectrum analyzer and SWR bridge, where no phase information is available?

If I am am measuring with S21, where I connect S21->DUT->S11, will the device internally "switch off" the SWR bridge, which would (in my opinion) no longer be needed?
If so, what would happen if I configure a S21 measurement, but then only connect DUT->S11, without using S21 at all? Wouldn't the result be similar to a regular spectrum analyzer?

Thanks,
Vitor

PS: Am I correct to assume that UK English writes "spectrum analySer" and USA English writes "spectrum analyZer"?
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11843
  • Country: us
Re: NanoVNA Custom Software
« Reply #272 on: September 07, 2019, 11:00:01 pm »
Hi,

I have the following question, which is probably obvious for you all, but not for me:

1) Port S11: Is it correct to assume that this port internally combines a TG, RF IN, DUT with a SWR bridge?
2) Port S21: Is it correct to assume that this port internally acts just as a TG?
3) Both TG and RF IN are synchronized, allowing for phase measurements, as opposed to SWR measurements carried out with a spectrum analyzer and SWR bridge, where no phase information is available?

If I am am measuring with S21, where I connect S21->DUT->S11, will the device internally "switch off" the SWR bridge, which would (in my opinion) no longer be needed?
If so, what would happen if I configure a S21 measurement, but then only connect DUT->S11, without using S21 at all? Wouldn't the result be similar to a regular spectrum analyzer?

Thanks,
Vitor

PS: Am I correct to assume that UK English writes "spectrum analySer" and USA English writes "spectrum analyZer"?

I have always written Z (unless I would make a mistake, which I often do)  All of my test equipment use Z on their markings.   

Yes, channel 0 has two ADCs for the reference and return (S11) while channel 1 has one ADC for the thru (S21).   Phase relative to the reference is available from both channels. 

This gets a bit odd when you consider using channel 1 for S11 while up and down converting the signal from channel 0.  While I am mixing it with a signal that is asynchronous to the reference, once it it down converted everything is back to normal.  The calibration handles the phase errors. 

There is no switching off. The signals are hardwired.   It's up to you to decide what to do with the data.   You can pull just the channel 0 or the channel 1 data.  For example, when I collect S11, there is no reason to read channel 1 and there is certainly no reason to read the frequency.  This is why my software runs so much faster as the Sharp software pulls everything down.  (no, not at 9600 BAUD.  I thought I had drove the final spike in that coffin).

Your last question is a bit tricky.  I understand what you are asking and the basic answer is yes!!!   If I connect my RF generator to channel 1, set the analyzer to read S21, with nothing on channel 0, you can see this sort of spectrum analyzer result in the attached graph.  Everything is asynchronous so the phase is nothing but noise but you can clearly see the magnitude peak at the frequency the RF generator is set to which in this case is 20MHz. 

But there's a catch which I talked about in that very first video I made.   You only have 101 samples to work with.  Say you have an RF generator with VERY low phase noise set to CW.   Would you be able to see it using a wide band sweep?  Most likely not.  You will need to know what you are looking for and zoom in around that area.
Think about it, what's 900MHz / 101.   Try looking a 7.968MHz oscillator with that.   

While you could calibrate out the errors in amplitude, I doubt you would be happy with the performance.   The graph shows what happens when I use a 20MHz center frequency and 100KHz span.   Someone may look at that and say, that Joe Smith has one really poor excuse for an RF generator.     Of course, attaching it to something other than a $50 instrument tells a whole different story. 
« Last Edit: September 07, 2019, 11:11:38 pm by joeqsmith »
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3984
  • Country: ua
Re: NanoVNA Custom Software
« Reply #273 on: September 07, 2019, 11:17:56 pm »
The frequency spacing determines how long the time domain trace is.  The Nyquist frequency determines the sampling.  If you sweep to 900 MHz at 1 MHz spacing you have data for 1 microsecond.  If you pad the end of the frequency series to raise Nyquist to 2 GHz you will have 250 ps sampling.

So, the time interval after IFFT is from 0 to 1/[frequency step] is it correct?


I'm looking at scikit-rf library for python, and there is also interesting function delay(d, unit,...) in network.py [line 2514]:

Code: [Select]
def delay(self, d, unit='deg', port=0, media=None,**kw):
        '''
        Add phase delay to a given port.
        This will cascade a matched line of length `d/2` from a given `media`
        in front of `port`. If `media==None`, then freespace is used.
        Parameters
        ----------
        d : number
                the length of transmissin line (see unit argument)
        unit : ['deg','rad','m','cm','um','in','mil','s','us','ns','ps']
                the units of d.  See :func:`Media.to_meters`, for details
        port : int
            port to add delay to.
        media: skrf.media.Media
            media object to use for generating delay. If None, this will
            default to freespace.
        '''
        if d ==0:
            return self
        d=d/2.
        if self.nports >2:
            raise NotImplementedError('only implemented for 1 and 2 ports')
        if media is None:
            from .media import Freespace
            media = Freespace(frequency=self.frequency,z0=self.z0[:,port])

        l =media.line(d=d, unit=unit,**kw)
        return l**self

But I don't understand python syntax well, so I cannot understand what happens here? Especially at these 3 lines:
Code: [Select]
            media = Freespace(frequency=self.frequency,z0=self.z0[:,port])

        l =media.line(d=d, unit=unit,**kw)
        return l**self

If I understand correctly, "l =media.line(..." represents impedance transformation of transmission line. And it someway applied to S11 parameters. And result represents S11 parameters at the end of transmission line. Is it correct?

What means "**" operator in python? According to google, this is power operator (2^3=8 equals to 2**3=8 in python), but the second argument is S11 matrix... What means power operator for matrix?  ???

Tried to google such operation (S11 matrix correction for specific electronic delay in transmission line), but didn't find anything... Can someone suggest some literature, where such operation for S11 matrix is explained?
« Last Edit: September 07, 2019, 11:31:55 pm by radiolistener »
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1627
  • Country: nz
Re: NanoVNA Custom Software
« Reply #274 on: September 08, 2019, 12:08:45 am »
There are some quite good docs.

https://scikit-rf.readthedocs.io/en/latest/tutorials/Introduction.html

"Element-wise mathematical operations on the s-parameters are accessible through overloaded operators."
"Cascading and de-embeding 2-port Networks can also be done though operators. Cascading is done through the power operator, **."



 
The following users thanked this post: radiolistener


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf