-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response calibration #349
Comments
Hello Zarath, I have made an effort to implement the so-called Enhanced Response Correction as suggested in issue #349. If you want to include or use my modifications, please check them carefully as I am not a python programmer (not at all, in fact). I hope this helps. |
I took a look at your changes and applied them atop of master |
Good morning,
Sorry about my mistake to include the original file instead of the modified
one.
Here is the modified sweepworker.py in the zip-file.
Best Regards,
Jos
…On Thu, 18 Feb 2021 at 02:10, galileo-pkm ***@***.***> wrote:
I took a look at your changes and applied them atop of master
branch. It seems that you have included in your zip file
SweepWorker.py.org file instead of your modified version.
Without it the code breaks at the apply calibration stage.
Can you provide your modifications for that file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQKGQ63BTWYT7RNIXXLLOTDS7RSJHANCNFSM4TW5FZNQ>
.
|
It seems that you forgot to attach the zip file :) |
Good morning,
Sorry again. I hope that it will arrive in your mailbox now.
Regards,
Jos
…On Thu, 18 Feb 2021 at 23:27, galileo-pkm ***@***.***> wrote:
It seems that you forget to attach the zip file :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQKGQ672FSBQ7B6SGPYPDQLS7WH45ANCNFSM4TW5FZNQ>
.
|
Unfortunately no but I think I know what is going on. |
Sorry, I didn't realize. Here it is once more. |
Great. |
I have applied your changes to the master branch and published them at: https://github.com/galileo-pkm/nanovna-saver/tree/PA0JOZ if anyone else wants to test them. As can be seen from the screenshot (through measurement) the modification does bring a significant improvement. I have attached the zip file with the measurements, made with the nano in uncalibrated state, calibrated with standard algorithm, and with this new method. Cal files are also included. Your changes, in the branch that I published, are as you made them but I removed your comments, as those are You did a great job, I will integrate it with the rest of the changes that I use and update this issue if I find something of significance. |
Good morning, |
It seems to a cosmetic issue only, I have updated the |
Great, thanks!
…On Sat, 27 Feb 2021 at 23:54, galileo-pkm ***@***.***> wrote:
It seems to a cosmetic issue only, I have updated the
branch at https://github.com/galileo-pkm/nanovna-saver/tree/PA0JOZ
with a fix.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQKGQ64AJSSJRFY64A2P54LTBFZ27ANCNFSM4TW5FZNQ>
.
|
Hello, |
There hasn't been much of a feedback on the feature and maintainer time is finite ... |
This feature is very important since it reduces inaccuracy in S21 measurements of about 0.5 dB (it depends on VNA Port 2 return loss). This feature is missing in NanoVNA-QT, NanoVNA-APP and NanoVNA-saver while has been integrated in the NanoVNA V2 firmware! It is very strange that a so simple modification of the calibration formulas, that results in a so big improvement of accuracy, is not on the top of the improvements list of NanoVNA-Saver (and other VNA SW applications). Anyway I understand that maybe many people are more interesed in "Features" than Accuracy. Thanks for your work on this very nice SW. Best Regards, Marco. |
Agree on the features vs accuracy POW, I guess that is what most users push for. |
As far as I understand there is no binary build that includes this enhancment. If at least an exe build would exist to test it, many people could try use it and appreciate the S21 accuracy improvements. I hope that at least a devel binary build can be made available. |
For people using Linux/Unix like OS-es it is easy, they can just download my repository. |
I'm surprised this pretty obvious bug is labelled as "enhancement" and so few people have noticed it. By definition measuring the thru standard after calibration should result in a straight line, with just random noise as deviations from 0dB. In my case (span of ~3GHz, NanoVNA v2) I'm seeing more than ±1dB of variation with the shape staying the same on every measurement, i.e. a large systematic error. Simply performing a sweep directly after 2-port calibration without touching anything will show this problem. When using the NanoVNA v2 directly there's a straight line with just < 0.1dB of random noise, just as expected. Only nanovna-saver has this bug. I've tried out @PA0JOZ changes from @galileo-pkm's branch and the results look a lot better at first glance (thanks!). However I'm not deep enough into calibration methods to judge whether those changes are correct. I also don't have a second VNA to verify the results against. @PA0JOZ @galileo-pkm Your branch is out of date; there are conflicts when trying to cherry-pick them on top of current master. In addition there are some debug prints and whitespace issues in your code. The maintainer may not want to merge the code in that state. If you need help with rebasing and clean-up please let me know. |
The reason why you are not seeing those ripples, when using the V2 standalone is that the V2 implements When I merged @PA0JOZ changes I did not want to submit a pull request because it would appear You can check out new branch that was rebased (and squash merged) on top of develop: https://github.com/galileo-pkm/nanovna-saver/tree/PA0JOZ_devel |
Good evening,
Just to make my position clear:
I am not a programmer and I don't know much about how to collaborate on a
github project. I just made some improvements to the calibration routine to
include the so-called Enhanced Response Calibration (I think it was called
this way by HP/Agilent).
I have no objection if someone wants to include it in the official code of
nanoVNASaver and I don't mind about authorship. Feel free to use it (or not)
Best Regards, Jos, PA0JOZ
…On Sun, 16 Jan 2022 at 21:44, galileo-pkm ***@***.***> wrote:
The reason why you are not seeing those ripples, when using the V2
standalone is that the V2 implements
this algorithm during the calibration.
When I merged @PA0JOZ <https://github.com/PA0JOZ> changes I did not want
to submit a pull request because it would appear
that I was the author. I guess that is not important any more, I will
submit a pull request latter ...
You can check out new branch that was rebased (and squash merged) on top
of develop:
https://github.com/galileo-pkm/nanovna-saver/tree/PA0JOZ_devel
—
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQKGQ67PFRMBYVZGFRYQS3TUWMUZVANCNFSM4TW5FZNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
For a non programmer you did a great job. |
Thanks!
…On Sun, 16 Jan 2022 at 22:21, galileo-pkm ***@***.***> wrote:
For a non programmer you did a great job.
Many experienced programmers would not dare to tackle an unfamiliar
project on
a fairly complex issue.
—
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQKGQ62NSZLQBXGIVEW5ZRDUWMZFNANCNFSM4TW5FZNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Just joined Github - at first just to post this reply. I agree with a poster (MCE66) above - performance should rate above adding features. Without this feature, S21 thru response is significantly inaccurate, so it really should have been included in the main build months ago - I downloaded it back then (and installed all the python stuff needed to do that - complete newbie on that front!) and checked it vs. a few circuits - much improved response. |
Pull request has been submitted, we wait for the approval ... |
Thanks, sounds encouraging!
…On Sun, 13 Feb 2022, 14:44 galileo-pkm, ***@***.***> wrote:
Pull request has been submitted, we wait for the approval ...
—
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXX4VXWURAXOGJ6KRG6JOO3U267THANCNFSM4TW5FZNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
This has been merged into develop branch. |
I've refactored and linted some part of the changes, so that i need reviews / tests with current testing branch |
Did a quick test using the same setup as before (firmware was different thou). Calibration and s2p files are attached. |
Current testing branch looks much better, thanks! I had some unrelated trouble with infinite recursion during version comparison. Will send an MR for that. |
I've been beating my head against a wall for the last few weeks trying to figure out this discrepancy, until I realised my V2Plus4 device was showing different results to nanovna-saver. I assumed it was USB interference or something esoteric until I stumbled across this issue just now. I can confirm the testing branch fixes it for me. Thank you! |
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. |
Hello Zarath,
I am using nanoVNASaver v3.8 in combination with a nanoVNA V2 and a nanoVNA V2Plus4.
I have noticed that if I measure the same THRU as used for the s21 calibration the result shows considerable ripple, while the result should be a (almost) flat line.
Although I am not a Python programmer at all I looked through your code for the calibration in calibration.py and found that the formula for e10e32 is not correct. The e11**2 should have been e11*e22. But since e22 is not calculated it would be better to set it zero so e10e32 = measured s21 of the THRU - isolation. This reduces the ripple a little bit depending on the actual hardware of the nanoVNA.
It would be even (much) better to implement the so-called enhanced response calculation. The formulas can be found in the book by Dunsmore or in the blog by K6JCA. The blog by K6JCA is most clear and adheres the most with the notation in calibration.py. See: http://k6jca.blogspot.com/search/label/VNA%3A%20Thru%20De-embedding. See the formulas for e22 and e10e32 in the figure "12-Term Error Model, Modified Error Terms if calibrating with a Defined THRU Standard".
I have double-checked the formulas and they are correct and correspond with the Dunsmore book, although with different nomenclature.
To be able to implement the enhanced response calibration it is necessary to measure not only the forward response but also the reflection while performing the calibration step with the through connector. The reflection is required to be able to estimate e22. As far as I can see form the saved calibration file now only the forward response is measured during calibration. And I say "estimate" because e22 can be calculated under the assumption that the through only has delay and no reflection, which for the frequencies involved is a reasonable assumption.
Of course I would be glad to test if you can fix this issue. In fact I already had figured out the required modifications for calibration.py and sweepworker.py, but I got stuck because the s11 of the through calibration step was not available.
If required you can reach me at pa0joz"-at-"veron.nl.
Best Regards, 73, Jos, PA0JOZ
The text was updated successfully, but these errors were encountered: