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: Z₀ = η₀/(2 π) ln(D/d) = 59.95849 Ω, η₀ = μ₀ c (CODATA 2018 μ₀; Pozar, Microwave Engineering, sec. 2.2); closed form, rel 10⁻⁹passed
z0_ohm59.9585 ± 6 × 10⁻⁸59.9585lockedunder 0.01 % of the tolerance usedeps_eff1 ± 10⁻¹²1lockedunder 0.01 % of the tolerance usedphase_velocity_m_per_s2.99792 × 10⁸ ± 0.00032.99792 × 10⁸lockedunder 0.01 % of the tolerance usedwavelength_mm299.792 ± 3 × 10⁻¹⁰299.792lockedunder 0.01 % of the tolerance usedr0002PTFE-filled coax
eps_r= 2.25, D/d = e: Z₀ = 59.95849/√(2.25) = 39.97233 Ω, velocity factor 1/√(2.25) = 2/3; closed form, rel 10⁻⁹passedz0_ohm39.9723 ± 4 × 10⁻⁸39.9723lockedunder 0.01 % of the tolerance usedvelocity_factor0.666667 ± 6.7 × 10⁻¹³0.666667lockedunder 0.01 % of the tolerance usedr0003100 Ω on a 50 Ω line (Pozar sec. 2.3): |Γ| = 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 √(50·100); stub at d = atan(√2)/(2 π) λ (shunt-stub closed form); closed forms, rel 10⁻⁹passed
gamma_mag0.333333 ± 3.3 × 10⁻¹³0.333333lockedunder 0.01 % of the tolerance usedswr2 ± 2 × 10⁻¹²2locked0.011 % of the tolerance usedreturn_loss_dB9.54243 ± 9.5 × 10⁻⁹9.54243lockedunder 0.01 % of the tolerance usedmismatch_loss_dB0.511525 ± 5.1 × 10⁻¹⁰0.511525lockedunder 0.01 % of the tolerance usedzin_r_ohm100 ± 10⁻⁷100lockedunder 0.01 % of the tolerance usedzin_x_ohm0 ± 10⁻⁹1.83697 × 10⁻¹⁴lockedunder 0.01 % of the tolerance usedquarter_wave_z_ohm70.7107 ± 7.1 × 10⁻⁸70.7107lockedunder 0.01 % of the tolerance usedvmax_from_load_wavelengths0 ± 10⁻¹²0lockedunder 0.01 % of the tolerance usedvmin_from_load_wavelengths0.25 ± 2.5 × 10⁻¹³0.25lockedunder 0.01 % of the tolerance usedstub1_d_wavelengths0.152043 ± 1.5 × 10⁻¹⁰0.152043lockedunder 0.01 % of the tolerance usedstub1_short_wavelengths0.152043 ± 1.5 × 10⁻¹⁰0.152043lockedunder 0.01 % of the tolerance usedstub2_d_wavelengths0.347957 ± 3.5 × 10⁻¹⁰0.347957lockedunder 0.01 % of the tolerance usedr0004Quarter-wave line: Zin = Z₀²/ZL (Pozar eq. 2.45); Z₀ = 50, ZL = 30 + j40 gives Zin = 30 - j40; 250 mm at 299.792458 MHz in air is exactly λ/4; closed form, rel 10⁻⁹passed
length_wavelengths0.25 ± 2.5 × 10⁻¹³0.25lockedunder 0.01 % of the tolerance usedzin_r_ohm30 ± 3 × 10⁻⁸30lockedunder 0.01 % of the tolerance usedzin_x_ohm-40 ± 4 × 10⁻⁸-40lockedunder 0.01 % of the tolerance usedr0005Short-circuited eighth-wave line: Zin = j Z₀ tan(π/4) = j 75 Ω (Pozar eq. 2.46); |Γ| = 1, SWR infinite (null), return loss 0 dB; closed form, abs 10⁻⁹passed
zin_r_ohm0 ± 10⁻⁹-4.16334 × 10⁻¹⁵lockedunder 0.01 % of the tolerance usedzin_x_ohm75 ± 7.5 × 10⁻⁸75lockedunder 0.01 % of the tolerance usedgamma_mag1 ± 10⁻¹²1lockedunder 0.01 % of the tolerance usedswr= lockedexact matchreturn_loss_dB0 ± 10⁻¹²0lockedunder 0.01 % of the tolerance usedr0006Matched load 50 Ω on 50 Ω: Γ = 0, SWR = 1, return loss infinite (null), Zin = Z₀ at any length; closed form, abs 10⁻¹²passed
gamma_mag0 ± 10⁻¹²0lockedunder 0.01 % of the tolerance usedswr1 ± 10⁻¹²1lockedunder 0.01 % of the tolerance usedreturn_loss_dB= lockedexact matchzin_r_ohm50 ± 5 × 10⁻¹¹50lockedunder 0.01 % of the tolerance usedzin_x_ohm0 ± 10⁻⁹0lockedunder 0.01 % of the tolerance usedr0007Pozar, Microwave Engineering (4th ed.) Example 5.2, single shunt short stub for ZL = 60 - j80 on 50 Ω: d = 0.110 / 0.260 λ, stub 0.095 / 0.405 λ; textbook figures to 3 digits, abs 10⁻³ λpassed
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≤ 10⁻⁹6.28037 × 10⁻¹⁶lockedinside the ranger0008Pozar, Microwave Engineering Example 3.7: microstrip on
eps_r= 2.20, h = 1.27 mm, W/d = 3.081 is 50 Ω witheps_e= 1.87, 90° at 2.5 GHz is 21.9 mm; the book sized W with its synthesis formula, Hammerstad's analysis agrees to ~1 %: rel 10⁻² on Z₀, abs 5 × 10⁻³ oneps_e, 0.05 mm on lengthpassedz0_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, Z₀ = η₀/(2 π) ln(8/u + u/4) = 166.7068 Ω (Hammerstad narrow-strip closed form); rel 10⁻⁹passedeps_eff1 ± 10⁻¹²1lockedunder 0.01 % of the tolerance usedz0_ohm166.707 ± 1.7 × 10⁻⁷166.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 Z₀ is set: z₀ (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 = z₀. |
eps_r | 1 | 1.0 | Relative permittivity of the dielectric (coax filling or microstrip substrate). For line = z₀ 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 z₀; Hammerstad's for microstrip). |
velocity_factor | 1 | Phase velocity over c, 1/√(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 | |Γ| of the load. |
gamma_phase_deg | deg | Phase of Γ at the load; null for a matched load. |
swr | 1 | Voltage standing-wave ratio; null (infinite) when |Γ| = 1. |
return_loss_dB | -20 log10 |Γ|; null (infinite) for a matched load. | |
mismatch_loss_dB | -10 log10(1 - |Γ|²); null when all power is reflected. | |
power_delivered_fraction | 1 | 1 - |Γ|². |
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, √(Z₀ RL); null for complex, short or open loads. |
quarter_wave_at_vmax_z_ohm | ohm | Transformer impedance Z₀ √(SWR) when placed at the voltage maximum. |
quarter_wave_at_vmin_z_ohm | ohm | Transformer impedance Z₀ / √(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 |Γ| left at the stub junction after adding the short stub; a check, ~10⁻¹⁶. |
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.