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

C10 · Lesson 24 · Matching lab

Designing L-networks, stub tuners and transformers in Python

On a Smith chart, matching is a matter of sliding along circles until you reach the center. In code it's a few formulas, and code checks itself: you can design a match, then compute the input impedance of the result and confirm it really is 50 Ω. In this lab you'll write an L-network designer, the single-stub tuner (both solutions), a binomial transformer, and a check of a quarter-wave transformer's bandwidth against its formula.

  • The curve is the reflection seen through a quarter-wave transformer from 50 Ω to a load R, computed exactly by transforming the load through the λ/4 section at each frequency.
  • The dashed line is a target reflection; the readout is the fractional band the formula predicts below it.
  • The curve crosses the target exactly at the predicted band edges. In the lab you'll compute the same check in code.

Predict

A single shunt stub can match any load with a nonzero resistance. How many distinct positions along the line (within half a wavelength) work?

Name it

L-network

To match Rlow to Rhigh: Q=Rhigh/Rlow−1, a series reactance Xs=QRlow next to the low resistance, and a shunt reactance Xp=Rhigh/Q across the high one, of opposite types.

Single shunt stub

For a load ZL=RL+jXL on a line of Z0, the distances d where the line's admittance has conductance 1/Z0 come from t=tan⁡βd:

t=XL±RL[(Z0−RL)2+XL2]/Z0RL−Z0

(or t=−XL/2Z0 when RL=Z0), with d/λ=arctan⁡(t)/2π, plus ½ if negative. The susceptance there is

B=RL2t−(Z0−XLt)(XL+Z0t)Z0[RL2+(XL+Z0t)2]

and a shorted stub must supply −B: its length is l/λ=arctan⁡(1/BZ0)/2π, modulo ½.

Binomial transformer

ln⁡Zn+1=ln⁡Zn+2−N(Nn)ln⁡(ZL/Z0) for n = 0 to N − 1, starting from Z0.

Checking

Every design here can be checked the same way: transform the load through each element with the input-impedance formula and confirm the result is Z0 at the design frequency.

Worked example

Find both shorted-stub solutions for ZL = 60 − j80 Ω on a 50 Ω line.

Show the solution
  1. The square root in the formula for t. 60[(50−60)2+802]50=60×650050=88.3
  2. The two values of t. t=−80±88.310 which is 0.832 or −16.8.
  3. Stub positions. Those give d = 0.110λ or 0.259λ.
  4. Stub lengths. The susceptances there need stubs of 0.095λ and 0.405λ.
  5. Check. These are the textbook answers (Pozar's Example 5.2), and putting either pair back through the formulas gives exactly 1/50 S at the junction.

Answer a 0.095λ stub at d = 0.110λ, or a 0.405λ stub at d = 0.259λ.

Worked example

Design a three-section binomial transformer from 50 Ω to 100 Ω.

Show the solution
  1. Weights. ln⁡2=0.693, and the binomial weights for N = 3 are 1, 3, 3, 1 over 8.
  2. First section. Z1=50e0.693/8Ω=54.5Ω
  3. Second section. Z2=50e0.693×4/8Ω=70.7Ω
  4. Third section. Z3=50e0.693×7/8Ω=91.7Ω and the last eighth reaches 100 Ω.
  5. Check the symmetry. The middle section is exactly 50×100, as symmetry demands.

Answer sections of 54.5 Ω, 70.7 Ω and 91.7 Ω.

Check

An L-network matches 12.5 Ω to 50 Ω at 50 MHz with a series inductor next to the load. What inductance?

Write units the way you normally would: 1.5 nH, 1500 pH and 0.0015 µH are the same answer.

Check

Write l_network(Rlow, Rhigh): return (Q, Xs, Xp), the Q, the series reactance next to Rlow and the shunt reactance across Rhigh (as positive magnitudes).

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

Check

Write single_stub(ZL, Z0): both shunt shorted-stub solutions, as a sorted list of (d, l) in wavelengths, each between 0 and ½.

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

Check

Write binomial(Z0, ZL, N): the N section impedances of a binomial transformer, starting next to Z0.

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

Check

Write qw_bandwidth(Z0, ZL, gm): the fractional band (as a fraction, not a percentage) of a quarter-wave transformer for |Γ| < gm, by the formula. Then write qw_gamma(Z0, ZL, x): the exact |Γ| at x times the design frequency, by transforming ZL through the section.

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

Explain why

Why do the two single-stub solutions usually have different bandwidths?

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.