nanovna-saver icon indicating copy to clipboard operation
nanovna-saver copied to clipboard

Wrong units shown for admittance values

Open retiredprogrammer54 opened this issue 3 years ago • 7 comments

The marker data for admittance use ohms as a unit. This should be S (for Siemens) or mho or Ω-1 (-1 as a power)

Schermafbeelding 2021-12-13 om 12 12 02 .

retiredprogrammer54 avatar Dec 13 '21 11:12 retiredprogrammer54

Actually, it looks like the calculation is not showing the admittance but the parallel impedance so either the calculation or the labeling of the value needs to change

rjordans avatar Dec 14 '21 10:12 rjordans

I believe the above pull request should fix the issue, can you check if it works for you?

rjordans avatar Dec 14 '21 10:12 rjordans

Saver show correct values in Om See https://en.wikipedia.org/wiki/Admittance G = R / (R * R + X * X) B = - X / (R * R + X * X) This result in Siemens as you write. Siemns = 1 / Om

But NanoVNA Saver use different formula: Rp = (R * R + X * X) / R !!! this result in Om Xp = (R * R + X * X) / X !!! this result in Om but lost sign??

DiSlord avatar Dec 21 '21 17:12 DiSlord

Well, as the link to Wikipedia shows, admittance is defined as 1/Z and has the unit Siemens. If you change the calculation you get something different which is not what I, and apparently others, would expect when you label it admittance.

The formula that NanoVNA Saver currently uses could be called something like parallel impedance model or so, but as long as it's called admittance by NanoVNA Saver it will cause confusion.

My change in #446 switches the calculation of admittance to provide the result in Siemens. I'd suggest to either do it that way or to re-label the admittance field, as it's currently presented, in a way that avoids this confusion.

rjordans avatar Dec 21 '21 17:12 rjordans

While add admittance in NanoVNA firmware i add additional markers: [MS_GB] = "G + jB", // in Siemens [MS_GLC] = "G + L/C", // G in Siemens [MS_RpXp] = "Rp + jXp", // In Om [MS_RpLC] = "Rp + L/C", // Rp in Om

Most question, need change sign for Xp? B = -X / (R * R + X * X)

DiSlord avatar Dec 21 '21 18:12 DiSlord

My first guess would be that you may have a j^2 in there that gives you the -1 factor.

Quick check: for a capacitor I'd expect some negative value for X, and a positive value for B so that would also match the formula

rjordans avatar Dec 21 '21 18:12 rjordans

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Oct 10 '22 08:10 github-actions[bot]