circuit (skrf.circuit)

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) 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.Ground(frequency, name[, z0]) Return a 1-port network of a grounded link, to be used in a Circuit description.

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, that is with both “inner” and “outer” ports
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

Circuit internals

Circuit.networks_dict([connections, min_nports]) Return the dictionnary 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 .
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 dictionnary describing the port and z0 of all graph edges.