jankae / LibreVNA

100kHz to 6GHz 2 port USB based VNA
GNU General Public License v3.0
1.08k stars 204 forks source link

Request R + jX as a function of frequency #48

Closed bwalker000 closed 2 years ago

bwalker000 commented 2 years ago

For impedance matching it is sometimes valuable to see a graph of R + jX as a function of frequency.

This is for S11 measurements.

This should be a simple matter of slicing the existing data in a different way.

BTW, thank you for having a working OSX port. So often projects pay lip-service to OSX support, without really delivering.

jankae commented 2 years ago

For impedance matching it is sometimes valuable to see a graph of R + jX as a function of frequency.

Do you mean two different graphs, one for the real part and one for the imaginary part across frequency? Otherwise I don't know how you could show a complex value on a two-dimensional graph.

This is partially possible (for the real part):

There is no option yet to see the imaginary part. You can show the data as capacitance/inductance, which is calculated from that, but viewing the imaginary part directly is not supported yet. But I think this should only be a small change, I will try to integrate it soon.

bwalker000 commented 2 years ago

You are exactly right. It would be two graphs, one for R and one for X. Helpful if they are on the same axis. Thank you!

jankae commented 2 years ago

Okay, this is implemented now. You have additional options for Real (R) and Imaginary (X) on the Y-axis. If you want both of them on the same graph, you can select one of them for the primary (left) and the other for the secondary (right) Y-axis.

arodland commented 2 years ago

I think @bwalker000 was looking for impedance R+jX (that is, resistance/reactance in ohms), not complex S11. The resistance is already there, as you say, the reactance isn't. Perhaps https://github.com/jankae/LibreVNA/pull/50 would do?

arodland commented 2 years ago

(The Smith chart displays these exact values, but a lot of people like a rectangular plot in that format).

jankae commented 2 years ago

Yes, that makes a lot of sense. Thank you for the PR, I just merged it with one tiny modification (only allowing reactance for reflection measurements, not for S12/S21)

bwalker000 commented 2 years ago

I just tested the new build. This looks great and is exactly what I was looking for. Thanks again.