A n-port electrical network [1].
For instructions on how to create Network see __init__().
The Network class stores these data structures internally in the form of complex numpy.ndarray‘s. These arrays are not interfaced directly but instead through the use of the properties:
Property | Meaning |
---|---|
s | scattering parameter matrix |
z0 | characteristic impedance matrix |
f | frequency vector |
Although these docs focus on s-parameters, other equivalent network representations such as z and y are available. Scalar projections of the complex network parameters are accesable through properties as well. These also return numpy.ndarray‘s.
Property | Meaning |
---|---|
s_re | real part of the s-matrix |
s_im | imaginary part of the s-matrix |
s_mag | magnitude of the s-matrix |
s_db | magnitude in log scale of the s-matrix |
s_deg | phase of the s-matrix in degrees |
The following operations act on the networks s-matrix.
Operator | Function |
---|---|
+ | element-wise addition of the s-matrix |
- | element-wise difference of the s-matrix |
* | element-wise multiplication of the s-matrix |
/ | element-wise division of the s-matrix |
** | cascading (only for 2-ports) |
// | de-embedding (for 2-ports, see inv) |
Different components of the Network can be visualized through various plotting methods. These methods can be used to plot individual elements of the s-matrix or all at once. For more info about plotting see the Plotting tutorial.
Method | Meaning |
---|---|
plot_s_smith() | plot complex s-parameters on smith chart |
plot_s_re() | plot real part of s-parameters vs frequency |
plot_s_im() | plot imaginary part of s-parameters vs frequency |
plot_s_mag() | plot magnitude of s-parameters vs frequency |
plot_s_db() | plot magnitude (in dB) of s-parameters vs frequency |
plot_s_deg() | plot phase of s-parameters (in degrees) vs frequency |
plot_s_deg_unwrap() | plot phase of s-parameters (in unwrapped degrees) vs frequency |
Network objects can be created from a touchstone or pickle file (see __init__()), by a Media object, or manually by assigning the network properties directly. Network objects can be saved to disk in the form of touchstone files with the write_touchstone() method.
An exhaustive list of Network Methods and Properties (Attributes) are given below
References
[1] | http://en.wikipedia.org/wiki/Two-port_network |
Attributes
a | Active scattering parameter matrix. |
a_arcl | The arcl component of the a-matrix .. |
a_arcl_unwrap | The arcl_unwrap component of the a-matrix .. |
a_db | The db component of the a-matrix .. |
a_deg | The deg component of the a-matrix .. |
a_deg_unwrap | The deg_unwrap component of the a-matrix .. |
a_im | The im component of the a-matrix .. |
a_mag | The mag component of the a-matrix .. |
a_rad | The rad component of the a-matrix .. |
a_rad_unwrap | The rad_unwrap component of the a-matrix .. |
a_re | The re component of the a-matrix .. |
a_vswr | The vswr component of the a-matrix .. |
f | the frequency vector for the network, in Hz. |
frequency | frequency information for the network. |
inv | a Network object with ‘inverse’ s-parameters. |
nports | the number of ports the network has. |
number_of_ports | the number of ports the network has. |
passivity | passivity metric for a multi-port network. |
s | Scattering parameter matrix. |
s11 | one-port sub-network. |
s12 | one-port sub-network. |
s21 | one-port sub-network. |
s22 | one-port sub-network. |
s_arcl | The arcl component of the s-matrix .. |
s_arcl_unwrap | The arcl_unwrap component of the s-matrix .. |
s_db | The db component of the s-matrix .. |
s_deg | The deg component of the s-matrix .. |
s_deg_unwrap | The deg_unwrap component of the s-matrix .. |
s_im | The im component of the s-matrix .. |
s_mag | The mag component of the s-matrix .. |
s_rad | The rad component of the s-matrix .. |
s_rad_unwrap | The rad_unwrap component of the s-matrix .. |
s_re | The re component of the s-matrix .. |
s_vswr | The vswr component of the s-matrix .. |
t | Scattering transfer parameters |
y | Admittance parameter matrix. |
y_arcl | The arcl component of the y-matrix .. |
y_arcl_unwrap | The arcl_unwrap component of the y-matrix .. |
y_db | The db component of the y-matrix .. |
y_deg | The deg component of the y-matrix .. |
y_deg_unwrap | The deg_unwrap component of the y-matrix .. |
y_im | The im component of the y-matrix .. |
y_mag | The mag component of the y-matrix .. |
y_rad | The rad component of the y-matrix .. |
y_rad_unwrap | The rad_unwrap component of the y-matrix .. |
y_re | The re component of the y-matrix .. |
y_vswr | The vswr component of the y-matrix .. |
z | Impedance parameter matrix. |
z0 | Characteristic impedance[s] of the network ports. |
z_arcl | The arcl component of the z-matrix .. |
z_arcl_unwrap | The arcl_unwrap component of the z-matrix .. |
z_db | The db component of the z-matrix .. |
z_deg | The deg component of the z-matrix .. |
z_deg_unwrap | The deg_unwrap component of the z-matrix .. |
z_im | The im component of the z-matrix .. |
z_mag | The mag component of the z-matrix .. |
z_rad | The rad component of the z-matrix .. |
z_rad_unwrap | The rad_unwrap component of the z-matrix .. |
z_re | The re component of the z-matrix .. |
z_vswr | The vswr component of the z-matrix .. |
Methods
__init__ | Network constructor. |
add_noise_polar | adds a complex zero-mean gaussian white-noise. |
add_noise_polar_flatband | adds a flatband complex zero-mean gaussian white-noise signal of |
copy | Returns a copy of this Network |
copy_from | Copies the contents of another Network into self |
flip | swaps the ports of a two port Network |
func_on_parameter | Aplies a function parameter matrix, one frequency slice at a time |
interpolate | Return an interpolated network, from a new :class:’~skrf.frequency.Frequency’. |
interpolate_from_f | Interpolates s-parameters from a frequency vector. |
interpolate_self | Interpolates s-parameters given a new |
interpolate_self_npoints | Interpolate network based on a new number of frequency points |
multiply_noise | multiplys a complex bivariate gaussian white-noise signal |
nudge | Perturb s-parameters by small amount. |
plot_a_arcl | plot the Network attribute a_arcl vs frequency. |
plot_a_arcl_unwrap | plot the Network attribute a_arcl_unwrap vs frequency. |
plot_a_complex | plot the Network attribute a vs frequency. |
plot_a_db | plot the Network attribute a_db vs frequency. |
plot_a_deg | plot the Network attribute a_deg vs frequency. |
plot_a_deg_unwrap | plot the Network attribute a_deg_unwrap vs frequency. |
plot_a_im | plot the Network attribute a_im vs frequency. |
plot_a_mag | plot the Network attribute a_mag vs frequency. |
plot_a_polar | plot the Network attribute a vs frequency. |
plot_a_rad | plot the Network attribute a_rad vs frequency. |
plot_a_rad_unwrap | plot the Network attribute a_rad_unwrap vs frequency. |
plot_a_re | plot the Network attribute a_re vs frequency. |
plot_a_vswr | plot the Network attribute a_vswr vs frequency. |
plot_it_all | |
plot_passivity | plots the passivity of a network, possibly for a specific port. |
plot_s_arcl | plot the Network attribute s_arcl vs frequency. |
plot_s_arcl_unwrap | plot the Network attribute s_arcl_unwrap vs frequency. |
plot_s_complex | plot the Network attribute s vs frequency. |
plot_s_db | plot the Network attribute s_db vs frequency. |
plot_s_deg | plot the Network attribute s_deg vs frequency. |
plot_s_deg_unwrap | plot the Network attribute s_deg_unwrap vs frequency. |
plot_s_im | plot the Network attribute s_im vs frequency. |
plot_s_mag | plot the Network attribute s_mag vs frequency. |
plot_s_polar | plot the Network attribute s vs frequency. |
plot_s_rad | plot the Network attribute s_rad vs frequency. |
plot_s_rad_unwrap | plot the Network attribute s_rad_unwrap vs frequency. |
plot_s_re | plot the Network attribute s_re vs frequency. |
plot_s_smith | plots the scattering parameter on a smith chart |
plot_s_vswr | plot the Network attribute s_vswr vs frequency. |
plot_y_arcl | plot the Network attribute y_arcl vs frequency. |
plot_y_arcl_unwrap | plot the Network attribute y_arcl_unwrap vs frequency. |
plot_y_complex | plot the Network attribute y vs frequency. |
plot_y_db | plot the Network attribute y_db vs frequency. |
plot_y_deg | plot the Network attribute y_deg vs frequency. |
plot_y_deg_unwrap | plot the Network attribute y_deg_unwrap vs frequency. |
plot_y_im | plot the Network attribute y_im vs frequency. |
plot_y_mag | plot the Network attribute y_mag vs frequency. |
plot_y_polar | plot the Network attribute y vs frequency. |
plot_y_rad | plot the Network attribute y_rad vs frequency. |
plot_y_rad_unwrap | plot the Network attribute y_rad_unwrap vs frequency. |
plot_y_re | plot the Network attribute y_re vs frequency. |
plot_y_vswr | plot the Network attribute y_vswr vs frequency. |
plot_z_arcl | plot the Network attribute z_arcl vs frequency. |
plot_z_arcl_unwrap | plot the Network attribute z_arcl_unwrap vs frequency. |
plot_z_complex | plot the Network attribute z vs frequency. |
plot_z_db | plot the Network attribute z_db vs frequency. |
plot_z_deg | plot the Network attribute z_deg vs frequency. |
plot_z_deg_unwrap | plot the Network attribute z_deg_unwrap vs frequency. |
plot_z_im | plot the Network attribute z_im vs frequency. |
plot_z_mag | plot the Network attribute z_mag vs frequency. |
plot_z_polar | plot the Network attribute z vs frequency. |
plot_z_rad | plot the Network attribute z_rad vs frequency. |
plot_z_rad_unwrap | plot the Network attribute z_rad_unwrap vs frequency. |
plot_z_re | plot the Network attribute z_re vs frequency. |
plot_z_vswr | plot the Network attribute z_vswr vs frequency. |
read | Read a Network from a ‘ntwk’ file |
read_touchstone | loads values from a touchstone file. |
renumber | renumbers some ports of a two port Network |
resample | Interpolate network based on a new number of frequency points |
write | Write the Network to disk using the pickle module. |
write_touchstone | write a contents of the Network to a touchstone file. |