Author Topic: VNA cal kit modelling script install guide  (Read 4305 times)

0 Members and 1 Guest are viewing this topic.

Offline hendorogTopic starter

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
VNA cal kit modelling script install guide
« on: February 28, 2018, 08:33:09 am »
I've written an install guide for IN3OTD's cal kit modelling script.
His page is here: http://www.qsl.net/in3otd/electronics/VNA_calkit/calkit.html

This has been discussed and used over in this thread:
https://www.eevblog.com/forum/testgear/kirkby-calibration-kit-alternatives/

It takes an s1p file for each standard, and outputs the characterising data you need to enter into the VNA.

Getting this working on Windows is a bit of a hassle, due to its dependancy on NLopt. So I have documented it to make life easier. Hopefully it saves a bit of time.

It produces output like this, along with a number of graphs which show how well it fits the data.

Code: [Select]
Optimization results:
offs_delay = 52.198199 ps
offs_loss = 5.475853 Gohm/s
offs_Z0 = 48.922942 ohm
C0 = -225.264412 * 1e-15 F
C1 = -2021.918164 * 1e-27 F/Hz
C2 = 2334.234374 * 1e-36 F/Hz^2
C3 = -242.942624 * 1e-45 F/Hz^3

Residual RMS error : -67.161024 dB

Edit: Minor edit to instructions.
« Last Edit: February 28, 2018, 10:01:14 am by hendorog »
 
The following users thanked this post: Mechatrommer, TheSteve, yl3akb, OH2LIY

Offline mgberry

  • Newbie
  • Posts: 8
  • Country: us
Re: VNA cal kit modelling script install guide
« Reply #1 on: March 14, 2018, 10:39:13 pm »
This is very helpful...Thanks. 

I also had some real issues getting NLopt up and running awhile back.  The script is pretty handy for creating your own cal standards.

Thanks,

Matt
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6910
  • Country: ca
Re: VNA cal kit modelling script install guide
« Reply #2 on: March 14, 2018, 11:53:37 pm »
@hendorog  while it may seem obvious to some, i think you should mention that a calibrated VNA is required to measure the standards under test to make s1p files.
Facebook-free life and Rigol-free shack.
 

Offline hendorogTopic starter

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: VNA cal kit modelling script install guide
« Reply #3 on: March 15, 2018, 01:06:58 am »
@hendorog  while it may seem obvious to some, i think you should mention that a calibrated VNA is required to measure the standards under test to make s1p files.

Good point - and there is no overview which provides the big picture either.
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
Re: VNA cal kit modelling script install guide
« Reply #4 on: June 03, 2019, 05:28:51 pm »
I realize this is an old thread, but thought someone might benefit from seeing a concrete example.  I built an open/short/load set of female SMA standards very similar to Claudio's and others.  For the load I used 2x 100-ohm thin film resistors from Susumu: https://www.digikey.com/product-detail/en/susumu/RG2012V-101-P-T1/RG2012V100PCT-ND/1248326

METAS VNA Tools also offers a cal-kit model fitting tool, which I used in conjunction with Claudio's Octave script.  The VNA Tools fitter is a bit more user friendly, offering a nice dialog where you can set the parameter initialization and lock parameters at will, while watching a graph of the fit accuracy.  OTOH I caught VNA Tools making an error which unfortunately means I cannot entirely trust its output; under certain conditions when the parameters hit their limits, the rms fit statistic and the graphs are incorrect.  So I mostly used VNA Tools to get a feel for how to constrain the parameters, then used the Octave script for final optimization.

I did not have access to a fancy calibrated VNA for the initial measurements, but a friend loaned me his Copper Mountain cal kit (good to 9 GHz).  I entered the data-sheet coefs into my Agilent 4396B combo analyzer (300 kHz to 1.8 GHz) as a user kit, then measured my homemade standards.  I fixed the test cable in place as best I could for stable measurements.  Results:

Open fit -61 dB rms:
offset delay = 38.07 ps
offset loss = 11.96 Gohm/s
offset Z0 = 50 ohms (constrained)
C0 = -0.1448e-15 F
C1 = 1904e-27 F/Hz
C2 = -968e-36 F/Hz^2

Short fit -59 dB rms:
offset delay = 37.14 ps
offset loss = 2.67 Gohm/s
offset Z0 = 49.44 ohms

Load fit -77 dB rms:
offset delay = 80.4 ps
offset loss = 0
offset Z0 = 50.95 ohms
arbitrary termination = 50.02 ohms (of dubious utility, but, why not)

The load measurement is curious.  My resistors were .02% tolerance, and at DC the impedance is as close to 50 ohms as I am able to measure, yet the calibrated return-loss measurement is "only" -42 dB at ~ 1 MHz.  The 4396B supports "arbitrary impedance" load standards, so by calling my load 49.21 ohms I get an excellent fit to the measured data.  Something doesn't add up.

UPDATE:  The reason for this was fairly obvious:  I measured the primary calibration standard and found its DC resistance ~ 50.8 ohms!  This is still within spec (better than -38 dB return loss to 9 GHz), but much-improved modeling results were obtained by entering that load in the VNA as "arbitrary impedance" with the measured DC value, re-measuring the DIY standards, and re-fitting.  The modeling results are now better all around.  Data and plots updated to reflect this.

In the meantime, I had to rip apart my VNA and test set again to try and diagnose a problem with two-port measurements.  Disappointingly, all indications are that the 4396B does not support test sets with mechanical transfer switches (see https://www.eevblog.com/forum/repair/agilent-4396b-spectrumnetworkimpedance-analyzer-repair/msg2459730/#msg2459730) despite it being a contemporary of the 8753 series :--  Thus I am now looking at ways to upgrade my test set to electronic switching.

Thanks again to Claudio IN3OTD for his useful model-fitting code!
« Last Edit: June 10, 2019, 12:40:59 am by mark03 »
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6910
  • Country: ca
Re: VNA cal kit modelling script install guide
« Reply #5 on: June 03, 2019, 06:28:06 pm »
I'd advise to be careful with Susumi. from experience their precision resistors behaved weird when heat test was applied. The resistance changed when heat was applied but did not swing back after heat was removed. I never use Susimi resistors since then, i use Panasonic ones.
Facebook-free life and Rigol-free shack.
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
Re: VNA cal kit modelling script install guide
« Reply #6 on: June 10, 2019, 12:45:19 am »
That wasn't the problem here; the finished standard is very close to 50 ohms.  The problem was assuming that the professional load standard was 50.0 ohms, when it was actually closer to 50.8 at low frequency.  Now the results make sense and are significantly better (post updated above).
 

Offline OH2LIY

  • Contributor
  • Posts: 44
  • Country: fi
Re: VNA cal kit modelling script install guide
« Reply #7 on: June 15, 2019, 10:18:26 am »
Hi, I  did loan R&S ZNB20 VNA and ZV-Z52 + ZN-Z51 autocals from my good friend. Softwares I installed to RPi3 (very easy, calculating speed is other thing :)). Everything runs nicely, but every calculating run I get different results (short seems to be ab. ok, but open gives problem).

Doing several runs, default opt.algorithm = NLOPT_GN_CRS2_LM options gives badly wrong offs_delay and offs_Z0. Changing to NLOPT_GN_DIRECT_L_RAND gives realistic values for  offs_delay and offs_Z0 but C0 to C4 are still wildly changing.

Here is measured ZV-Z135 vs. ZV-Z52
Code: [Select]
ZV-Z135 1. run
NLOPT_GN_CRS2_LM NLOPT_GN_DIRECT_L_RAND NLOPT_GN_DIRECT_L_RAND NLOPT_GN_DIRECT_L_RAND from R&S datasheet
offs_delay = 42.371331 ps offs_delay = 30.080272 ps offs_delay = 30.193585 ps offs_delay = 30.192812 ps 30,821ps 9,24mm
offs_loss = 10.514279 Gohm/s offs_loss = 2.290398 Gohm/s offs_loss = 3.477191 Gohm/s offs_loss = 3.386195 Gohm/s
offs_Z0 = 30.000000 ohm    offs_Z0 = 48.998628 ohm offs_Z0 = 49.179694 ohm offs_Z0 = 49.176977 ohm
C0 = -798.986893 * 1e-15 F C0 = 0.169351 * 1e-15 F C0 = 0.267923 * 1e-15 F C0 = 0.244675 * 1e-15 F -7,425fF
C1 = 10000.000000 * 1e-27 F/Hz C1 = 1708.355208 * 1e-27 F/Hz C1 = 1404.316218 * 1e-27 F/Hz C1 = 1376.810395 * 1e-27 F/Hz 2,47fF
C2 = -8433.135261 * 1e-36 F/Hz^2 C2 = -10.556205 * 1e-36 F/Hz^2 C2 = -9.216564 * 1e-36 F/Hz^2 C2 = -10.762751 * 1e-36 F/Hz^2 -0,226fF
C3 = 1671.350599 * 1e-45 F/Hz^3 C3 = -0.169351 * 1e-45 F/Hz^3 C3 = -0.473050 * 1e-45 F/Hz^3 C3 = -0.192145 * 1e-45 F/Hz^3 0,00618fF

Residual RMS error : -48.185993 dB Residual RMS error : -49.189880 dB Residual RMS error : -49.196187 dB




Here is Anritsu 22KF50. Using VNA I approximate electrical lenght to be ab. 42,009ps

Code: [Select]
22KF50 (female)

OPEN
20GHz data 1001pts NLOPT_GN_DIRECT_L_RAND NLOPT_GN_DIRECT_L_RAND NLOPT_GN_DIRECT_L_RAND

offs_delay = 28.710349 ps offs_delay = 41.587105 ps offs_delay = 40.474517 ps offs_delay = 41.279768 ps
offs_loss = 1.880376 Gohm/s offs_loss = 1.178295 Gohm/s offs_loss = 1.977415 Gohm/s offs_loss = 1.810120 Gohm/s
offs_Z0 = 48.876609 ohm offs_Z0 = 49.886187 ohm offs_Z0 = 49.280887 ohm offs_Z0 = 49.943507 ohm
C0 = 242.172088 * 1e-15 F C0 = -1.573142 * 1e-15 F C0 = 4.518946 * 1e-15 F C0 = -0.384148 * 1e-15 F
C1 = 2097.143813 * 1e-27 F/Hz C1 = -97.836874 * 1e-27 F/Hz C1 = 3487.316352 * 1e-27 F/Hz C1 = 1030.916293 * 1e-27 F/Hz
C2 = 586.611516 * 1e-36 F/Hz^2 C2 = 88.301227 * 1e-36 F/Hz^2 C2 = -44.735429 * 1e-36 F/Hz^2 C2 = 30.721115 * 1e-36 F/Hz^2
C3 = 45.725005 * 1e-45 F/Hz^3 C3 = 1.573925 * 1e-45 F/Hz^3 C3 = -2.791711 * 1e-45 F/Hz^3 C3 = 0.982168 * 1e-45 F/Hz^3

Residual RMS error : -56.410139 dB Residual RMS error : -45.885849 dB Residual RMS error : -46.602073 dB Residual RMS error : -47.469405 dB



If someone is interested, I added my measurements... I still have to make N/7mm connector measurements, saddly I have to return VNA after weekend (my own HP8720C is soooo slow and ancient comparing....  8))



OH2LIY   Ramppa
 

Offline OH2LIY

  • Contributor
  • Posts: 44
  • Country: fi
Re: VNA cal kit modelling script install guide
« Reply #8 on: June 15, 2019, 10:20:52 am »
couple pictures....
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
Re: VNA cal kit modelling script install guide
« Reply #9 on: June 16, 2019, 05:40:02 am »
Hi, I  did loan R&S ZNB20 VNA and ZV-Z52 + ZN-Z51 autocals from my good friend. Softwares I installed to RPi3 (very easy, calculating speed is other thing :)). Everything runs nicely, but every calculating run I get different results (short seems to be ab. ok, but open gives problem).

Sometimes the solution appears under-determined, where two or more variables spin wildly without any real change in the goodness of fit.  It can then help to fix one of the parameters, e.g. force offset Z0 = 50.  Also, I think it's normal for the higher-order capacitance polynomial coefs to vary from one run to the next, because at these frequencies they have essentially no effect.  They are "placebo parameters".  As long as the fit looks about right and none of the parameters are stuck at their extreme values, you should be fine.

Can you post pictures of your homemade standards?
 

Offline hendorogTopic starter

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: VNA cal kit modelling script install guide
« Reply #10 on: June 16, 2019, 11:43:58 pm »
To get a better fit we found it can be useful to reduce the frequency range - e.g. DC-3GHz and 3GHz-6GHz.

The downside is that you need to change the cal to suit the frequency of course.

The more 'ideal' way is to do avoid this fitting step entirely, and do the calculations on a PC using software Metas or scikit-rf using actual measurements of the standards and the DUT.

 

Offline OH2LIY

  • Contributor
  • Posts: 44
  • Country: fi
Re: VNA cal kit modelling script install guide
« Reply #11 on: June 17, 2019, 03:05:29 pm »
Hi, I  did loan R&S ZNB20 VNA and ZV-Z52 + ZN-Z51 autocals from my good friend. Softwares I installed to RPi3 (very easy, calculating speed is other thing :)). Everything runs nicely, but every calculating run I get different results (short seems to be ab. ok, but open gives problem).

Sometimes the solution appears under-determined, where two or more variables spin wildly without any real change in the goodness of fit.  It can then help to fix one of the parameters, e.g. force offset Z0 = 50.  Also, I think it's normal for the higher-order capacitance polynomial coefs to vary from one run to the next, because at these frequencies they have essentially no effect.  They are "placebo parameters".  As long as the fit looks about right and none of the parameters are stuck at their extreme values, you should be fine.

Can you post pictures of your homemade standards?

Years ago, when I got my first HP8753A, back then I used homemade N-male short and open. Load was Suhner, selected from bigger pile to be bestest available. But after those, I got Anritsu 3753LF kit and HP85032B. Measuring these standards was just for curiosity. Actually I have Anritsu 22K50/22KF50 and I'd like to use them on my HP8720C. There is no known specs for those standards. 


Ramppa
 

Offline OH2LIY

  • Contributor
  • Posts: 44
  • Country: fi
Re: VNA cal kit modelling script install guide
« Reply #12 on: June 17, 2019, 03:07:35 pm »
To get a better fit we found it can be useful to reduce the frequency range - e.g. DC-3GHz and 3GHz-6GHz.

The downside is that you need to change the cal to suit the frequency of course.

The more 'ideal' way is to do avoid this fitting step entirely, and do the calculations on a PC using software Metas or scikit-rf using actual measurements of the standards and the DUT.

Tnx, I'll have to try find Metas and/or scikit-rf and study more how to use them...
 

Offline geraldSOENCO

  • Newbie
  • Posts: 1
  • Country: us
Re: VNA cal kit modelling script install guide
« Reply #13 on: December 09, 2022, 03:57:49 pm »
Good Morning hendorog,

I know I'm a little late on this post, I'm following the HOWTO instruction for the octave graphs and I have a couple .s1p files but I'm not sure which directory I should store them in order to "call" them in the calkit_model() function.

I've trying copying them to the Octave site C:\Octave\Octave-4.2.1\lib\octave\site\oct\x86_64-w64-mingw32 but no luck

Any help is greatly appreciated!!

Jerry

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf