sycan.components.basic.mutual_coupling¶
Mutual inductance coupling (SPICE K).
Couples two or more inductors with a coupling coefficient k
(0 ≤ k ≤ 1). In AC analysis stamps -s·M_ij into the auxiliary
rows for every pair (i, j), where M_ij = k · sqrt(L_i · L_j).
At DC the inductors are shorts so coupling has no effect.
Inductor values are resolved lazily during MNA assembly so that
a K element may appear earlier in the netlist than the L
elements it references.
Classes
|
Mutual inductance coupling. |
- class sycan.components.basic.mutual_coupling.MutualCoupling(name, k=<factory>, *, include_noise=None)[source]¶
Bases:
ComponentMutual inductance coupling.
Couples a set of inductors with coefficient
k. Inductor values are resolved at MNA-build time from the flat component list, soKcan precede theLelements it references.- Parameters:
name (str) – Designator (e.g.
"K1").k (sympy.core.expr.Expr) – Coupling coefficient (default 1).
include_noise (None | str | list[str] | tuple[str, ...] | frozenset[str])
- name: str¶
- k: Expr¶
- include_noise: None | str | list[str] | tuple[str, ...] | frozenset[str] = None¶
- ports: ClassVar[tuple[str, ...]] = ()¶
- SUPPORTED_NOISE: ClassVar[frozenset[str]] = frozenset({})¶
- couple(name, L_value=None)[source]¶
Register a coupled inductor.
If
L_valueis given the inductor value is locked immediately (Python API convenience path). Otherwise the value is resolved lazily duringresolve()(SPICE-parser path, whereKmay appear beforeL).- Parameters:
name (str)
L_value (Expr | None)
- Return type:
None
- resolve(components)[source]¶
Look up inductor values from a flat component list.
- Parameters:
components (list[Component])
- Return type:
None
- stamp(ctx)[source]¶
- Parameters:
ctx (StampContext)
- Return type:
None