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]},... )Methods
Section titled “Methods”| Method | Description |
|---|---|
copy | Create a copy. |
force_symmetric | Force this Z matrix to be symmetric. |
to_y_matrix | Convert this Z matrix to a Y matrix by inversion. |
copy(self)Create a copy.
Returns
ZMatrix: New copy.
force_symmetric
Section titled “force_symmetric”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
Section titled “to_y_matrix”to_y_matrix(self)Convert this Z matrix to a Y matrix by inversion.
Returns
YMatrix: The corresponding admittance matrix.
Attributes
Section titled “Attributes”| Attribute | Description |
|---|---|
elements | dict[tuple[str, str], ndarray]: Z matrix elements (read only). |
frequencies | ndarray: Z matrix frequencies (read only). |
properties | Properties: Object properties. |
terminals | dict[str, Terminal | None]: Z matrix terminals (read only). |
wavelengths | ndarray: Z matrix wavelengths (read only). |
elements
Section titled “elements”dict[tuple[str, str], ndarray]: Z matrix elements (read only).
frequencies
Section titled “frequencies”ndarray: Z matrix frequencies (read only).
properties
Section titled “properties”Properties: Object properties.
terminals
Section titled “terminals”dict[str, Terminal | None]: Z matrix terminals (read only).
wavelengths
Section titled “wavelengths”ndarray: Z matrix wavelengths (read only).