Giter Site home page Giter Site logo

Comments (3)

keikawa avatar keikawa commented on July 25, 2024 1

Hi @shabaz123 ,
The code you provided looks good to me.
The OpenShort de-embedding is based on the assumption that the embedding network (here the connected cables) is shorter than the wavelength of the RF signal. Therefore, longer cables result in lower accuracy.
In this case, if the VNA has an electrical length correction function, it is recommended to use it.
Alternatively, the following methods are available for electrical length correction using scikit-rf.

import skrf as rf
import matplotlib.pyplot as plt

dut_fname = './ns-dut-148.s1p'
open_fname = './ns-open.s1p'
corrected_dut_fname = './ns-dut-corrected.s1p'

# read the two files
dut_ntwk = rf.Network(dut_fname)
open_ntwk = rf.Network(open_fname)

# Electrical length compensation
lossless_tline = rf.media.DefinedGammaZ0(frequency=dut_ntwk.frequency, z0_port=None, z0=50, Z0=None, gamma=1j)
electrical_length = open_ntwk.s_deg[:,0,0] / 2
corrected_dut_ntwk = lossless_tline.line(electrical_length, unit='deg') ** dut_ntwk

# save the corrected DUT network
corrected_dut_ntwk.write_touchstone(corrected_dut_fname)

# plot the results on a Smith chart
dut_ntwk.plot_s_smith(lw=2, label='Uncorrected')
corrected_dut_ntwk.plot_s_smith(lw=2, label='Corrected')

plt.show()

from scikit-rf.

shabaz123 avatar shabaz123 commented on July 25, 2024

Hi @keikawa

Thank you for this! I just tried your code, and the corrected plot result is superb : )
The diagram here shows the setup I had used and the approximate lengths of cables:
test-setup
Since I was only interested in 10MHz to 1GHz, I thought the lengths may have been fine. In any case, I'm very happy that the electrical length compensation method of de-embedding works, and I can run with this. My VNA is a very entry-level product, it doesn't have an automatic way of doing this.

Incidentally, to hopefully contribute back to the project a bit, I have forked scikit-rf and created a branch and hope to add code for the FPC1500 to become a supported VNA for control. I have made a start, but the command seems to be missing in the VNA user manual to retrieve vector measurements (I can retrieve scalar!), so I've raised a case with R&S, and will continue with that once they reply.

Thanks again for your help.

from scikit-rf.

shabaz123 avatar shabaz123 commented on July 25, 2024

Closing, thank you for the help!

from scikit-rf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.