-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Vector Network Analyzer Sweep Power Measurement,and create the network! #903
Comments
Just to make sure I understand, you have already generated your .sNp files? |
No,Only the real part and imaginary part of the S parameter, each power point corresponds to an array. |
Oh sorry, just saw the upload txt file. Looking at that file, it IS indeed a .sNp file. Trying to load it myself, it looks like scikit-rf doesn't currently support Network objects with a power sweep instead of a frequency sweep. A possible feature request @jhillairet |
thanks for your answer |
A It is however possible to represent a power sweep dataset using a import numpy as np
import matplotlib.pyplot as plt
import skrf as rf
#%% Dummy data representing the real and imaginary parts of S11 for a power sweep
# from 0 to -20dbm at a frequency of 2GHZ, with a total of 201 points.
powers = np.linspace(0, -20, 201)
s11_r = np.random.rand(powers.size)
s11_i = np.random.rand(powers.size)
#%% Creating a NetworkSet containing 201 networks, each containing the S11 at 2GHz.
# Power values are defined using a named parameter 'power'
s11 = s11_r + 1j*s11_i
freq = rf.Frequency(2, 2, npoints=1, unit='GHz')
ntwks = [rf.Network(frequency=freq, s=s, params={'power': power}) for (s, power) in zip(s11, powers)]
ns = rf.NetworkSet(ntwks)
#%% Examples on how to access NetworkSet data
ns.sel({'power': [-5, -10]}) # -> NetworkSet for -5 and -10 dBm
#%% plot s vs power
_s = [n.s_db.squeeze() for n in ns]
_powers = [n.params['power'] for n in ns]
fig, ax = plt.subplots()
ax.plot(_powers, _s)
ax.set_xlabel('power [dBm]')
ax.set_ylabel('s11 [dB]') Please refer to the NetworkSet Tutorial and this NetworkSet example.
Please refer first to the calibration tutorial of the documentation and the calibration examples. Without additional information on your particular setup, it's hard for us to help us more.
As mentionned by @cafeclimber , scikit-rf expects frequency dependant Touchstone file. Other kind of sweep are currently not supported. |
thank you,I will try your way now |
In #905 , I created the SOLT calibration standard and got the calibration object 'cal'. As an example, the 'cal' object is created in the 10mhz to 6Ghz frequency range, can you calibrate the S-parameters of '_s' in jhillairet's code ? @jhillairet |
VNA_POW.txt
I use a program-controlled VNA to perform power sweep measurements. I set the software to measure S-parameters from 0 to -20dbm at a frequency of 2GHZ, with a total of 201 points.
The data format read by the software is an array of real and imaginary parts. Now I want to turn these data into network objects through the Scikit-rf library. How to do it? And these data are uncalibrated, how to calibrate?
Another question I have is how to use the scikit-rf library function to create a network object from the above type of file and draw its image. This file is the result file of sweep power measurement with a vector network analyzer in my laboratory. It is at 2GHZ frequency, the power range is -25dbm to 5dbm, the sweep power measurement result of the amplifier.
please help me
The text was updated successfully, but these errors were encountered: