DiSlord / NanoVNA-D

Firmware for NanoVNA, NanoVNA-H, NanoVNA-H4. Support SD Card, external Serial connection, fast measure, fast exchange vs CPU
304 stars 66 forks source link

Series through measurement of a known 200 ohm resistor yields poor result #82

Closed owenduffy closed 5 months ago

owenduffy commented 5 months ago

I conducted an experiment to measure a 200 ohm 1% resistor in a fixture with very short connections.

At 1MHz it measured R=225 and X~=0 by series through s21, but very close to 200+j0 by s11 reflection.

I then saved raw SOLT files and a raw s21 sweep and used scikit-rf to develop a one path calibration and apply it to the raw sweep. The results were much closer to expectation.

It appears that NanoVNA-H4 v4.3 and firmware v1.2.30 have a problem with making corrected s21 measurements.

Whilst it seems that s21 measurements of matched unknows like a 10dB attenuator gives expected result, the mismatched nature of the series 200 ohm DUT is not properly corrected. Also noted is that a s11 reflection measurement of the same result gave expected results suggesting the correction for source mismatch is working properly in that application.

The experiment is described in detail at An experiment with NanoVNA and series through impedance measurement and An experiment with NanoVNA and series through impedance measurement… more.

Inserting a good 10dB attenuator on the Port 2 jack and calibrating made no significant difference, but adding the same attenuator to Port 1 and recalibrating did improve accuracy, again pointing at failure of the source match correction in the firmware.

Owen

DiSlord commented 5 months ago

Due to NanoVNA not full 2 port VNA, it use Incomplete_2-Port_Vector_Network_Analyzer_Calibration https://www.researchgate.net/publication/263307473_Incomplete_2-Port_Vector_Network_Analyzer_Calibration_Methods

For S21, NanoVNA use 1-PORT + NORMALIZATION method, this method give errors ENHANCED RESPONSE method give better results, but need more space for calibration data and more calculations

Main error from not fully 50Om Ch1 (uncnown params)

PS try use NanoVNA Saver calibration (reset calibration on NanoVNA) and measure S21 (NanoVNA Saver add additional Thrurefl calibration step, this allow additional compensate error)

DiSlord commented 5 months ago

Test this code https://groups.io/g/nanovna-beta-test/topic/nanovna_h4_ethanced_responce/10663625

owenduffy commented 5 months ago

Thank you, I installed NanoVNA.H4.v1.2.32.bin.

nanovnah4_20240613_060106i

It made no significant difference to my test case of 200R @ 1MHz. Note above that it shows s11 reflection Z as 249.8-j0.194 which is expected, but R21ser=227.3 and r21xser=0.048.

BTW, did you fix the phase inversion of raw s21?

Owen

owenduffy commented 5 months ago

I did another test on a quite small ferrite cored inductor. @10Mhz s11Z=2960+j2060.

nanovnah4_20240613_063211i

So, this shows 4000+j1870.

Owen

DiSlord commented 5 months ago

Thank you, I installed NanoVNA.H4.v1.2.32.bin. you not enable Enhanced responce on calibration page Enable it image

owenduffy commented 5 months ago

you not enable Enhanced responce on calibration page Enable it

Ah... yes, that makes a difference.

BTW the spelling is RESPONSE. nanovnah4_20240613_064932i

That looks much better, thanks again.

Owen

DiSlord commented 5 months ago

Added in https://github.com/DiSlord/NanoVNA-D/commit/ace0512cf605d0dd94ae5ee9ff35a4db11802ab8 Port2 compensation not appy, need think how free memory for e22 calibration data (Port2 impedance)

owenduffy commented 5 months ago

You may be interested in my changes to NanoVNA-App to do Enhanced Response correction: s21 Enhanced Response correction. .

owenduffy commented 5 months ago

It appears that v1.2.32 is a good fix for this issue.

Thanks.

Owen

DiSlord commented 5 months ago

I update NanoVNA-App, add full ER calibration include port2 impedance compensation https://github.com/DiSlord/NanoVNA-App/commit/6836d130576f98cc4528cc79396e94e462dd61f8