reflection_coefficient
Builtin index · Signal processing
result = reflection_coefficient(z, [z0=50])
Input: z, z0 · Output: result
What it is
z: an impedance — real or complex, scalar or vector (ohms); z0 (optional number, default 50): the real reference impedance.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = reflection_coefficient(z, [z0=50]) | z scalar or vectorz: an impedance — real or complex, scalar or vector (ohms).z0 number, optional (default 50)z0 (optional number, default 50): the real reference impedance. | result — | Returns Γ = (z - z0)/(z + z0), complex. Errors at z = -z0, where Γ is genuinely undefined rather than merely large (impossible for a passive load). |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
g = reflection_coefficient(100) # 100 ohm on a 50 ohm line
print("gamma = {g}") # 0.333333
print("VSWR = {vswr(g)}") # 2
print("RL = {return_loss(g)} dB") # 9.542425
swept = reflection_coefficient([50, 100, 0, 25])
print("VSWR swept = {vswr(swept)}") # [1, 2, inf, 2] -- the short is inf
smith([50, 100, 25], z0=50) # same arithmetic, drawn
output
gamma = 0.333333 VSWR = 2 RL = 9.542425 dB VSWR swept = [1, 2, inf, 2]
from signal-processing