CoupledTwoPorts

class pmrf.models.composite.nodal.CoupledTwoPorts(coupled: list[Model], coupling: Any, method: str = 'coefficients', *, name: str | None = None, metadata: Any = None)

Bases: Model

(experimental) Wraps N 2-port models (e.g., Inductors) and couples them via a given K-matrix.

Returns a 2N-port model where Model 1 occupies ports (0, 1), Model 2 occupies ports (2, 3), and so on.

Mathematical Formulation

The coupling is evaluated by performing a Pi-network decomposition on each 2-port model. First, the admittance matrix (\(Y\)) of each 2-port is decomposed into a series branch and two shunt branches to ground:

  • Series admittance: \(Y_{series} = -Y_{12}\)

  • Port 1 shunt: \(Y_{p1} = Y_{11} + Y_{12}\)

  • Port 2 shunt: \(Y_{p2} = Y_{22} + Y_{21}\)

The series branches are converted to impedances (\(Z_{series} = 1 / Y_{series}\)) to form the branch impedance matrix (\(Z_b\)). A mutually coupled branch matrix is then constructed, where the mutual impedance between branches \(i\) and \(j\) is calculated using the reactive parts of the branches:

\[Z_{ij} = j k_{ij} \sqrt{\Im(Z_{ii}) \Im(Z_{jj})}\]

Using Modified Nodal Analysis (MNA) with an incidence matrix (\(A\)), this coupled series branch matrix is translated to a \(2N \times 2N\) nodal admittance matrix:

\[Y_{nodal} = A Z_b^{-1} A^T\]

Finally, the uncoupled shunt parasitics (\(Y_{p1}, Y_{p2}\)) are added back onto the diagonal elements corresponding to the individual port nodes to complete the network.

Parameters:
  • coupled (list[Model]) – The sequence of 2-port models to couple.

  • coupling (Any) – The coupling definition between the elements. Meaning depends on method. For fixed coupling, pass Python collections and numpy arrays. For variable coupling, pass parameters from pmrf.parameters.

  • method (str, default='coefficients') – The meaning of coupling. Options are (‘coefficients’, ‘matrix’). For ‘coefficients’, must be a list of tuples (model_i, model_j, k_factor). For ‘matrix’, must be an NxN coupling matrix which is symmetric, has 1.0 on the diagonals, and is positive semi-definite.

coupled: list[Model]

The sequence of 2-port series models to couple.

coupling: Any

The coupling definition (list of tuples or array-like matrix).

property coupling_matrix: Array

Evaluates the coupling definition based on the method and returns the NxN coupling matrix.

Returns:

The full, symmetric NxN coupling matrix.

Return type:

jnp.ndarray

method: str = 'coefficients'

The method used to interpret the coupling definition.