sycan.network_params

Network-parameter conversions for two-port (and n-port where it applies) representations: Z, Y, S, ABCD, T.

Conventions follow Pozar, Microwave Engineering:

  • Z (impedance): V = Z @ I

  • Y (admittance): I = Y @ V

  • S (scattering): b = S @ a with reference impedance Z0

  • ABCD (chain): [V1; I1] = ABCD @ [V2; -I2] (2-port only)

  • T (transfer): [a1; b1] = T @ [b2; a2] (2-port only)

All matrices are sympy.Matrix so the same code works for symbolic parameters and for numeric evaluation via .subs(...) / .evalf(). Z0 defaults to 50 Ω; pass a sympy Symbol for symbolic work or a sympy Matrix (diagonal) for n-port with per-port reference impedances.

Functions

abcd_to_s(M[, Z0])

ABCD → S, single real reference impedance Z0 on both ports.

abcd_to_y(M)

abcd_to_z(M)

s_to_abcd(S[, Z0])

S → ABCD, single real reference impedance Z0 on both ports.

s_to_t(S)

S → T, with [a1; b1] = T·[b2; a2] (Pozar convention).

s_to_y(S[, Z0])

Y = Y0·(I − S)·(I + S)⁻¹ with Y0 = 1/Z0.

s_to_z(S[, Z0])

Z = (I − S)⁻¹·(I + S)·Z0 (n-port, real Z0).

t_to_s(T)

y_to_abcd(Y)

y_to_s(Y[, Z0])

S = (I − Z0·Y)·(I + Z0·Y)⁻¹.

y_to_z(Y)

Z = Y⁻¹ (n-port).

z_to_abcd(Z)

z_to_s(Z[, Z0])

S = (Z − Z0)·(Z + Z0)⁻¹ (n-port, real Z0).

z_to_y(Z)

Y = Z⁻¹ (n-port).

sycan.network_params.z_to_y(Z)[source]

Y = Z⁻¹ (n-port).

Parameters:

Z (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix

sycan.network_params.y_to_z(Y)[source]

Z = Y⁻¹ (n-port).

Parameters:

Y (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix

sycan.network_params.z_to_s(Z, Z0=50)[source]

S = (Z − Z0)·(Z + Z0)⁻¹ (n-port, real Z0).

Parameters:
  • Z (MutableDenseMatrix | list | tuple)

  • Z0 (Expr | int | float | MutableDenseMatrix)

Return type:

MutableDenseMatrix

sycan.network_params.s_to_z(S, Z0=50)[source]

Z = (I − S)⁻¹·(I + S)·Z0 (n-port, real Z0).

Parameters:
  • S (MutableDenseMatrix | list | tuple)

  • Z0 (Expr | int | float | MutableDenseMatrix)

Return type:

MutableDenseMatrix

sycan.network_params.y_to_s(Y, Z0=50)[source]

S = (I − Z0·Y)·(I + Z0·Y)⁻¹.

Parameters:
  • Y (MutableDenseMatrix | list | tuple)

  • Z0 (Expr | int | float | MutableDenseMatrix)

Return type:

MutableDenseMatrix

sycan.network_params.s_to_y(S, Z0=50)[source]

Y = Y0·(I − S)·(I + S)⁻¹ with Y0 = 1/Z0.

Parameters:
  • S (MutableDenseMatrix | list | tuple)

  • Z0 (Expr | int | float | MutableDenseMatrix)

Return type:

MutableDenseMatrix

sycan.network_params.z_to_abcd(Z)[source]
Parameters:

Z (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix

sycan.network_params.abcd_to_z(M)[source]
Parameters:

M (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix

sycan.network_params.y_to_abcd(Y)[source]
Parameters:

Y (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix

sycan.network_params.abcd_to_y(M)[source]
Parameters:

M (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix

sycan.network_params.abcd_to_s(M, Z0=50)[source]

ABCD → S, single real reference impedance Z0 on both ports.

Parameters:
  • M (MutableDenseMatrix | list | tuple)

  • Z0 (Expr | int | float | MutableDenseMatrix)

Return type:

MutableDenseMatrix

sycan.network_params.s_to_abcd(S, Z0=50)[source]

S → ABCD, single real reference impedance Z0 on both ports.

Parameters:
  • S (MutableDenseMatrix | list | tuple)

  • Z0 (Expr | int | float | MutableDenseMatrix)

Return type:

MutableDenseMatrix

sycan.network_params.s_to_t(S)[source]

S → T, with [a1; b1] = T·[b2; a2] (Pozar convention).

Parameters:

S (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix

sycan.network_params.t_to_s(T)[source]
Parameters:

T (MutableDenseMatrix | list | tuple)

Return type:

MutableDenseMatrix