connect_s_arbitrary
- connect_s_arbitrary(Smats, z0s, connections, port_indices, s_def='power')[source]
Connect multiple S-parameter networks together in an arbitrary topology.
This is the most general function for connecting RF networks together in a circuit.
This function constructs a global S-matrix by connecting ports from various sub-networks at common nodes (intersections).
- Parameters:
Smats (Sequence[jnp.ndarray]) – A sequence of S-parameter matrices for the component networks. Each element has shape (Nf, n_ports, n_ports).
z0s (Sequence[jnp.ndarray]) – A sequence of characteristic impedances (z0) for the component networks.
connections (Sequence[Sequence[tuple[int, int]]]) – A list of connection nodes. Each node is a list of (network_index, port_index) tuples indicating which ports are electrically connected at that node.
port_indices (Sequence[int]) – A list of network indices. Any port belonging to a network in this list that appears in connections is treated as an external port of the resulting connected network.
s_def (str, optional, default='power') – The S-parameter definition to use (‘power’, ‘traveling’, or ‘pseudo’).
- Returns:
The resulting S-parameter matrix and characteristic impedances of the connected system.
- Return type:
tuple[jnp.ndarray, jnp.ndarray]