transmission_line
Lossless transmission line: characteristic impedance (given, air- or dielectric-filled coax, or microstrip by Hammerstad's quasi-static formulas), load reflection coefficient, standing-wave ratio, return and mismatch loss, input impedance of the loaded line at a physical or electrical length, voltage maxima and minima, quarter-wave transformer and single shunt-stub matching (short or open stub, both solutions). No conductor or dielectric loss, no dispersion, zero strip thickness.
- Field
- Waves, optics and circuits
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.02 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001Air coax, D/d = e: Z0 = eta0/(2 pi) ln(D/d) = 59.95849 ohm, eta0 = mu0 c (CODATA 2018 mu0; Pozar, Microwave Engineering, sec. 2.2); closed form, rel 1e-9passed
z0_ohm59.9585 ± 6e-0859.9585lockedunder 0.01 % of the tolerance usedeps_eff1 ± 1e-121lockedunder 0.01 % of the tolerance usedphase_velocity_m_per_s2.99792e+08 ± 0.00032.99792e+08lockedunder 0.01 % of the tolerance usedwavelength_mm299.792 ± 3e-10299.792lockedunder 0.01 % of the tolerance usedr0002PTFE-filled coax eps_r = 2.25, D/d = e: Z0 = 59.95849/sqrt(2.25) = 39.97233 ohm, velocity factor 1/sqrt(2.25) = 2/3; closed form, rel 1e-9passed
z0_ohm39.9723 ± 4e-0839.9723lockedunder 0.01 % of the tolerance usedvelocity_factor0.666667 ± 6.7e-130.666667lockedunder 0.01 % of the tolerance usedr0003100 ohm on a 50 ohm line (Pozar sec. 2.3): |Gamma| = 1/3, SWR = 2, return loss 20 log10 3 = 9.5424 dB, mismatch loss -10 log10(8/9); half-wave line repeats the load; quarter-wave transformer sqrt(50*100); stub at d = atan(sqrt 2)/(2 pi) lambda (shunt-stub closed form); closed forms, rel 1e-9passed
gamma_mag0.333333 ± 3.3e-130.333333lockedunder 0.01 % of the tolerance usedswr2 ± 2e-122locked0.011 % of the tolerance usedreturn_loss_dB9.54243 ± 9.5e-099.54243lockedunder 0.01 % of the tolerance usedmismatch_loss_dB0.511525 ± 5.1e-100.511525lockedunder 0.01 % of the tolerance usedzin_r_ohm100 ± 1e-07100lockedunder 0.01 % of the tolerance usedzin_x_ohm0 ± 1e-091.83697e-14lockedunder 0.01 % of the tolerance usedquarter_wave_z_ohm70.7107 ± 7.1e-0870.7107lockedunder 0.01 % of the tolerance usedvmax_from_load_wavelengths0 ± 1e-120lockedunder 0.01 % of the tolerance usedvmin_from_load_wavelengths0.25 ± 2.5e-130.25lockedunder 0.01 % of the tolerance usedstub1_d_wavelengths0.152043 ± 1.5e-100.152043lockedunder 0.01 % of the tolerance usedstub1_short_wavelengths0.152043 ± 1.5e-100.152043lockedunder 0.01 % of the tolerance usedstub2_d_wavelengths0.347957 ± 3.5e-100.347957lockedunder 0.01 % of the tolerance usedr0004Quarter-wave line: Zin = Z0^2/ZL (Pozar eq. 2.45); Z0 = 50, ZL = 30 + j40 gives Zin = 30 - j40; 250 mm at 299.792458 MHz in air is exactly lambda/4; closed form, rel 1e-9passed
length_wavelengths0.25 ± 2.5e-130.25lockedunder 0.01 % of the tolerance usedzin_r_ohm30 ± 3e-0830lockedunder 0.01 % of the tolerance usedzin_x_ohm-40 ± 4e-08-40lockedunder 0.01 % of the tolerance usedr0005Short-circuited eighth-wave line: Zin = j Z0 tan(pi/4) = j 75 ohm (Pozar eq. 2.46); |Gamma| = 1, SWR infinite (null), return loss 0 dB; closed form, abs 1e-9passed
zin_r_ohm0 ± 1e-09-4.16334e-15lockedunder 0.01 % of the tolerance usedzin_x_ohm75 ± 7.5e-0875lockedunder 0.01 % of the tolerance usedgamma_mag1 ± 1e-121lockedunder 0.01 % of the tolerance usedswr= lockedexact matchreturn_loss_dB0 ± 1e-120lockedunder 0.01 % of the tolerance usedr0006Matched load 50 ohm on 50 ohm: Gamma = 0, SWR = 1, return loss infinite (null), Zin = Z0 at any length; closed form, abs 1e-12passed
gamma_mag0 ± 1e-120lockedunder 0.01 % of the tolerance usedswr1 ± 1e-121lockedunder 0.01 % of the tolerance usedreturn_loss_dB= lockedexact matchzin_r_ohm50 ± 5e-1150lockedunder 0.01 % of the tolerance usedzin_x_ohm0 ± 1e-090lockedunder 0.01 % of the tolerance usedr0007Pozar, Microwave Engineering (4th ed.) Example 5.2, single shunt short stub for ZL = 60 - j80 on 50 ohm: d = 0.110 / 0.260 lambda, stub 0.095 / 0.405 lambda; textbook figures to 3 digits, abs 1e-3 lambdapassed
stub1_d_wavelengths0.11 ± 0.0010.110423locked42 % of the tolerance usedstub1_short_wavelengths0.095 ± 0.0010.0949746locked2.5 % of the tolerance usedstub2_d_wavelengths0.26 ± 0.0010.259445locked56 % of the tolerance usedstub2_short_wavelengths0.405 ± 0.0010.405025locked2.5 % of the tolerance usedstub_residual_gamma≤ 1e-096.28037e-16lockedinside the ranger0008Pozar, Microwave Engineering Example 3.7: microstrip on eps_r = 2.20, h = 1.27 mm, W/d = 3.081 is 50 ohm with eps_e = 1.87, 90 deg at 2.5 GHz is 21.9 mm; the book sized W with its synthesis formula, Hammerstad's analysis agrees to ~1 %: rel 1e-2 on Z0, abs 5e-3 on eps_e, 0.05 mm on lengthpassed
z0_ohm50 ± 0.550.2479locked50 % of the tolerance usedeps_eff1.87 ± 0.0051.8712locked24 % of the tolerance usedlength_mm21.9 ± 0.0521.916locked32 % of the tolerance usedr0009Microstrip in air (eps_r = 1), w/h = 0.5: eps_eff = 1 exactly, Z0 = eta0/(2 pi) ln(8/u + u/4) = 166.7068 ohm (Hammerstad narrow-strip closed form); rel 1e-9passed
eps_eff1 ± 1e-121lockedunder 0.01 % of the tolerance usedz0_ohm166.707 ± 1.7e-07166.707lockedunder 0.01 % of the tolerance used
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
line | z0 | How Z0 is set: z0 (give z0_ohm; eps_r then sets the wavelength), coax (coax_outer_mm, coax_inner_mm, eps_r) or microstrip (strip_width_mm, substrate_height_mm, eps_r). | |
z0_ohm | ohm | 50.0 | Characteristic impedance, used when line = z0. |
eps_r | 1 | 1.0 | Relative permittivity of the dielectric (coax filling or microstrip substrate). For line = z0 it is the effective permittivity that sets the guided wavelength. |
coax_outer_mm | mm | 7.0 | Inner diameter of the coax shield (D). |
coax_inner_mm | mm | 3.04 | Diameter of the coax centre conductor (d), smaller than D. |
strip_width_mm | mm | 3.0 | Microstrip width w (zero thickness assumed). |
substrate_height_mm | mm | 1.6 | Microstrip substrate height h between strip and ground. |
frequency_Hz | Hz | 1000000000.0 | Operating frequency; with eps_eff it sets the guided wavelength. |
length_mm | mm | Physical length of the line from load to input. Give this or length_wavelengths, not both; with neither the line is a quarter wave. | |
length_wavelengths | 1 | Electrical length in guided wavelengths (0.25 = quarter wave). | |
load | impedance | The termination: impedance (load_r_ohm + j load_x_ohm), short or open. | |
load_r_ohm | ohm | 100.0 | Load resistance (passive: 0 or more). |
load_x_ohm | ohm | 0.0 | Load reactance: positive inductive, negative capacitive. |
swr_limit | 1 | 2.0 | Largest SWR accepted; sets the verdict. |
Readings
| Name | Unit | Meaning |
|---|---|---|
z0_ohm | ohm | Characteristic impedance of the line. |
eps_eff | 1 | Effective relative permittivity (eps_r for coax and z0; Hammerstad's for microstrip). |
velocity_factor | 1 | Phase velocity over c, 1/sqrt(eps_eff). |
phase_velocity_m_per_s | m/s | |
wavelength_mm | mm | Guided wavelength at frequency_Hz. |
length_mm | mm | |
length_wavelengths | 1 | |
length_source | Which input set the length, or 'default quarter wave'. | |
electrical_length_deg | deg | |
gamma_mag | 1 | |Gamma| of the load. |
gamma_phase_deg | deg | Phase of Gamma at the load; null for a matched load. |
swr | 1 | Voltage standing-wave ratio; null (infinite) when |Gamma| = 1. |
return_loss_dB | -20 log10 |Gamma|; null (infinite) for a matched load. | |
mismatch_loss_dB | -10 log10(1 - |Gamma|^2); null when all power is reflected. | |
power_delivered_fraction | 1 | 1 - |Gamma|^2. |
zin_r_ohm | ohm | Input resistance of the loaded line; null when the input impedance is infinite. |
zin_x_ohm | ohm | Input reactance; null when infinite. |
zin_infinite | True when the line presents an open circuit at its input. | |
gamma_in_phase_deg | deg | |
vmax_from_load_wavelengths | 1 | First voltage maximum, distance from the load in wavelengths (in [0, 0.5)). |
vmin_from_load_wavelengths | 1 | First voltage minimum, distance from the load in wavelengths. |
quarter_wave_z_ohm | ohm | Quarter-wave transformer for a real load, sqrt(Z0 RL); null for complex, short or open loads. |
quarter_wave_at_vmax_z_ohm | ohm | Transformer impedance Z0 sqrt(SWR) when placed at the voltage maximum. |
quarter_wave_at_vmin_z_ohm | ohm | Transformer impedance Z0 / sqrt(SWR) when placed at the voltage minimum. |
stub_match | The two single shunt-stub solutions, nearest the load first; empty when matched or unmatchable. | |
stub1_d_wavelengths | 1 | |
stub1_short_wavelengths | 1 | |
stub1_open_wavelengths | 1 | |
stub2_d_wavelengths | 1 | |
stub2_short_wavelengths | 1 | |
stub2_open_wavelengths | 1 | |
stub_residual_gamma | 1 | Largest |Gamma| left at the stub junction after adding the short stub; a check, ~1e-16. |
swr_limit | 1 | |
swr_ok | SWR at or below swr_limit. | |
warnings | List of plain-language warnings. |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.