Skip to content

ZMatrix

ZMatrix(frequencies, elements, terminals=None)

Nodal impedance matrix (Z matrix).

Represents a frequency-dependent nodal impedance matrix where terminals correspond to circuit nodes. Can be returned from LumpedModel.start_mna; when a port_map is specified, LumpedModel will extract port parameters and convert to S-matrix.

Args

  • frequencies (Sequence[float]): Frequency values for the computed elements.
  • elements (dict[tuple[str, str], Sequence[complex]]): Mapping from pairs of terminal names to Z matrix elements. The keys must be: ("terminal1", "terminal2").
  • terminals (dict[str, Terminal | None] | None): Mapping from terminal names to terminals or to None.

Example

>>> z_matrix = pf.ZMatrix(
... [pf.C_0 / 1.55],
... {("T0", "T0"): [50], ("T0", "T1"): [25]},
... )
MethodDescription
copyCreate a copy.
force_symmetricForce this Z matrix to be symmetric.
to_y_matrixConvert this Z matrix to a Y matrix by inversion.

copy(self)

Create a copy.

Returns

ZMatrix: New copy.

force_symmetric(self)

Force this Z matrix to be symmetric.

Reciprocity is ensured by averaging transposed entries (if both are present) or filling in missing elements.

Returns

ZMatrix: This object.

to_y_matrix(self)

Convert this Z matrix to a Y matrix by inversion.

Returns

YMatrix: The corresponding admittance matrix.

AttributeDescription
elementsdict[tuple[str, str], ndarray]: Z matrix elements (read only).
frequenciesndarray: Z matrix frequencies (read only).
propertiesProperties: Object properties.
terminalsdict[str, Terminal | None]: Z matrix terminals (read only).
wavelengthsndarray: Z matrix wavelengths (read only).

dict[tuple[str, str], ndarray]: Z matrix elements (read only).

ndarray: Z matrix frequencies (read only).

Properties: Object properties.

dict[str, Terminal | None]: Z matrix terminals (read only).

ndarray: Z matrix wavelengths (read only).