vswr
Builtin index · Signal processing
result = vswr(g)
Input: g · Output: result
What it is
g: a reflection coefficient.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = vswr(g) | g numbernot documented yet | result number | Returns (1 + |Γ|)/(1 - |Γ|). A perfect match is exactly 1; total reflection is inf, which is the true value rather than a large stand-in. |Γ| >= 1 (an active or mismeasured load) returns inf rather than the negative number the unguarded formula produces. |
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