circuit (skrf.circuit)

The Circuit class represents a circuit of arbitrary topology, consisting of an arbitrary number of N-ports networks.

Like in an electronic circuit simulator, the circuit must have one or more ports connected to the circuit. The Circuit object allows one retrieving the M-ports network, where M is the number of ports defined.

The results are returned in Circuit object.

Building a Circuit

Circuit(connections[, name])

Creates a circuit made of a set of N-ports networks.

Circuit.Port(frequency, name[, z0])

Return a 1-port Network to be used as a Circuit port.

Circuit.SeriesImpedance(frequency, Z, name)

Return a 2-port network of a series impedance.

Circuit.ShuntAdmittance(frequency, Y, name)

Return a 2-port network of a shunt admittance.

Circuit.Ground(frequency, name[, z0])

Return a 2-port network of a grounded link.

Circuit.Open(frequency, name[, z0])

Return a 2-port network of an open link.

Representing a Circuit

Circuit.plot_graph(**kwargs)

Plot the graph of the circuit using networkx drawing capabilities.

Network Representations

Circuit.network

Return the Network associated to external ports.

Circuit.s

Return the global scattering parameters of the circuit.

Circuit.s_external

Return the scattering parameters for the external ports.

Circuit.s_active(a)

Return "active" s-parameters of the circuit's network for a defined wave excitation a.

Circuit.z_active(a)

Return the "active" Z-parameters of the circuit's network for a defined wave excitation a.

Circuit.y_active(a)

Return the "active" Y-parameters of the circuit's network for a defined wave excitation a.

Circuit.vswr_active(a)

Return the "active" VSWR of the circuit's network for a defined wave excitation a.

Circuit.port_z0

Return the external port impedances.

Voltages and Currents

Circuit.voltages(power, phase)

Voltages at internal ports.

Circuit.voltages_external(power, phase)

Voltages at external ports

Circuit.currents(power, phase)

Currents at internal ports.

Circuit.currents_external(power, phase)

Currents at external ports.

Circuit internals

Circuit.networks_dict([connections, min_nports])

Return the dictionary of Networks from the connection setup X.

Circuit.networks_list([connections, min_nports])

Return a list of unique networks (sorted by appearing order in connections).

Circuit.connections_nb

Return the number of intersections in the circuit.

Circuit.connections_list

Return the full list of connections, including intersections.

Circuit.nodes_nb

Return the number of nodes in the circuit.

Circuit.dim

Return the dimension of the C, X and global S matrices.

Circuit.intersections_dict

Return a dictionary of all intersections with associated ports and z0:

Circuit.port_indexes

Return the indexes of the "external" ports.

Circuit.C

Return the global scattering matrix of the networks.

Circuit.X

Return the concatenated intersection matrix [X] of the circuit.

Graph representation

Circuit.graph()

Generate the graph of the circuit.

Circuit.G

Generate the graph of the circuit.

Circuit.edges

Return the list of all circuit connections

Circuit.edge_labels

Return a dictionary describing the port and z0 of all graph edges.