C1013 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

C10 · Lesson 13 · Transmission line lab

Reflections, input impedance and bounce diagrams in Python

Lessons 7 to 11 worked reflections, standing waves and input impedance by hand, one case at a time. Engineers don't: they write a few lines of code once and run every case through it. In this lab you'll write that code with complex numbers: the reflection coefficient and VSWR of any load, a line's input impedance, the load voltage after each bounce, the impedance a TDR trace implies, and the length of a stub for any reactance.

  • A step from a source of resistance Rs drives a 50 Ω line ending in R. The staircase is the load voltage as reflections arrive, one round trip apart (time in units of the one-way delay).
  • With either end matched, it settles on the first arrival. With both mismatched, it rings toward the DC divider value R/(Rs+R).
  • Make both reflections the same sign (both resistances above 50 Ω, or both below): the steps approach from one side. Make them opposite: the voltage overshoots and rings.

Predict

A TDR launches 0.5 V into a 50 Ω cable and sees a reflection of +0.1 V from a discontinuity. What impedance does the discontinuity present?

Name it

The formulas in code

  • Γ=(ZL−Z0)/(ZL+Z0), with an open load (ZL=∞) giving exactly 1. Python's complex numbers handle reactive loads directly: 25 - 50j.
  • VSWR=(1+|Γ|)/(1−|Γ|), infinite for |Γ|=1.
  • Zin=Z0ZL+jZ0tan⁡βlZ0+jZLtan⁡βl, and for an open load −jZ0cot⁡βl.
  • Bounces: the launched step is VsZ0/(Rs+Z0); each arrival adds the current wave times (1+ΓL), and the next wave is the current one times ΓLΓS.
  • TDR: a reflected step Vr on an incident step Vi means Γ=Vr/Vi and Z=Z0(1+Γ)/(1−Γ).
  • Stubs: a shorted stub of length l looks like jZ0tan⁡βl, so a reactance X needs l/λ=arctan⁡(X/Z0)/2π, taken modulo ½ to keep it positive.

Worked example

A 1 V step from a 25 Ω source drives a 50 Ω line into 100 Ω. List the load voltage after each of the first three arrivals.

Show the solution
  1. Launched step and reflection coefficients. 5075×1V=0.667V ΓL=13,ΓS=−13
  2. First arrival. V1=0.667×43=0.889V
  3. Second arrival. The next wave is 0.667×13×(−13)=−0.0741 V, and at the load it adds 4/3 of that: V2=0.889−0.0988=0.790V
  4. Third arrival. The third adds +0.011 V: V3=0.801V
  5. Final value. It closes on the DC divider value: 100125=0.8V

Answer the load reads 0.889 V, 0.790 V and 0.801 V, closing on 0.8 V.

Worked example

How long a shorted 50 Ω stub looks like −j50 Ω?

Show the solution
  1. Solve for the electrical length. A shorted stub looks like jZ0tan⁡βl, so set tan⁡βl=−50/50: arctan⁡(−1)=−π4 which gives l/λ=−0.125.
  2. Make it a real length. Adding a half wavelength gives −0.125λ+0.5λ=0.375λ
  3. Why so long. A shorted stub needs to be between a quarter and a half wavelength to look capacitive.
  4. A shorter option. An open stub 0.125λ long would do the same job in less space.

Answer the shorted stub must be 0.375λ long.

Check

A TDR launches 0.5 V into 50 Ω and sees a −0.1 V reflection. What impedance is there?

Write units the way you normally would: 1.5 Ω, 1500 mΩ and 0.0015 kΩ are the same answer.

Check

Write gamma(ZL, Z0) (a complex number; math.inf means an open circuit and gives exactly 1) and vswr(ZL, Z0) (math.inf when |Γ| is 1).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write zin(ZL, Z0, bl): the input impedance of a line of electrical length bl radians ending in ZL (which may be math.inf).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write bounce(Vs, Rs, Z0, RL, n): the load voltage after each of the first n arrivals when a step of Vs from a source of resistance Rs drives a line of Z0 into a resistive load RL.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write stub_length(Z0, X): the length, in wavelengths between 0 and ½, of a shorted stub that looks like jX.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why does a line's input impedance repeat every half wavelength, rather than every full wavelength?

Practice

Keep practicing

One kind of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.