---
title: "Capstone: match an antenna to a 50 Ω line, then verify it with TDR and FDTD"
heading: A resonant antenna modeled as a series RLC, an L-network that matches it to 50 Ω at its resonance, the bandwidth over which the match holds, reading a load's reflection from a time-domain reflectometer's step, and checking the whole idea with a 1D FDTD simulation of the line
eyebrow: D8 · Lesson 18 · Capstone
xp: 80
---

::: hook
A 2.45 GHz antenna on a sensor board measures 25 Ω at resonance, and the radio expects 50 Ω. Untreated, the mismatch reflects a ninth of the power and detunes the radio's amplifier. This capstone designs the fix and checks it two ways, the way an engineer would: in the frequency domain, by computing the reflection coefficient across the band, and in the time domain, by launching a step down a simulated line and watching what comes back, as a time-domain reflectometer (TDR) does on the bench.
:::

::: play
- The antenna's impedance from 2.2 to 2.7 GHz (modeled as 25 Ω in series with an RLC of Q = 8 resonant at 2.45 GHz), and the impedance seen through an L-network: a series inductor L next to the antenna and a shunt capacitor C across the line.
- With L = 1.62 nH and C = 1.30 pF the matched curve passes through the center of the chart at 2.45 GHz.
- The readout gives |Γ| at the chosen frequency; under 1/3 means a VSWR under 2.
:::

```sim plot
view: smith
z0: 50
x: f = 2.2G..2.7G Hz
slider: L = 0..4 step 0.01 = 1.62
slider: C = 0..3 step 0.01 = 1.3
slider: g = 2.2..2.7 step 0.005 = 2.45
plot: 25 + j*200*(f/2.45e9 - 2.45e9/f) | label: antenna
plot: 1/(1/(25 + j*200*(f/2.45e9 - 2.45e9/f) + j*2*pi*f*L*1e-9) + j*2*pi*f*C*1e-12) | label: matched
z: 1/(1/(25 + j*200*(g/2.45 - 2.45/g) + j*2*pi*g*1e9*L*1e-9) + j*2*pi*g*1e9*C*1e-12) | label: at the chosen frequency | vswr
readout: |Γ| at the chosen frequency = abs((1/(1/(25 + j*200*(g/2.45 - 2.45/g) + j*2*pi*g*1e9*L*1e-9) + j*2*pi*g*1e9*C*1e-12) - 50)/(1/(1/(25 + j*200*(g/2.45 - 2.45/g) + j*2*pi*g*1e9*L*1e-9) + j*2*pi*g*1e9*C*1e-12) + 50)) | digits: 3
```

::: predict
## A TDR launches a 1 V step through 50 Ω into a 50 Ω line ending in a 100 Ω resistor. After the reflection returns, what voltage does the TDR read?

- [ ] 0.5 V
- [x] About 0.667 V
- [ ] 1 V
- [ ] 0.333 V

::: reveal
The step enters the line at 0.5 V (half the source, since the line's 50 Ω matches the source resistor). At the load Γ = (100 − 50)/(100 + 50) = 1/3, so 0.167 V comes back and the TDR reads 0.5 × (1 + 1/3) = 0.667 V, the same as the DC divider 100/(100 + 50). The time it takes to return gives the distance to the fault.
:::
:::

::: nameit
## The design

At resonance the antenna is a pure 25 Ω, so the L-network of lesson 14 does the job: with $R_L$ = 25 Ω and $Z_0$ = 50 Ω, $Q = \sqrt{50/25 - 1}$ = 1, so the series inductor has $X_s$ = 25 Ω and the shunt capacitor $X_p$ = 50 Ω: L = 1.624 nH and C = 1.299 pF at 2.45 GHz.

## Bandwidth

Away from resonance the antenna's reactance grows quickly (its Q is 8) and the match degrades. The Python step finds where |Γ| < 1/3 (VSWR < 2): 2.349 to 2.551 GHz, 202 MHz or 8.2%, comfortably covering the 2.400 to 2.4835 GHz band. The bare antenna, with |Γ| = 1/3 at resonance, never gets below VSWR 2 at all.

## TDR

A step $V_s$ through $Z_0$ launches $V_s/2$ onto a matched line. A resistive load reflects $\Gamma V_s/2$, so after the round trip $2l/v$ the source end reads $\frac{V_s}{2}(1 + \Gamma)$. The time locates the discontinuity, the step size gives Γ; capacitive and inductive loads show as dips and bumps that decay.

## FDTD

Stepping the telegrapher's equations (lesson 9) on a grid of cells, with the source and load as boundary nodes, reproduces exactly that experiment numerically. The reflection coefficient read from the simulated source voltage matches the formula, which checks both the model and the code.
:::

::: example
## A TDR's reflection returns 6 ns after the step on coax with a velocity factor of 0.66. How far away is the load?

::: solution
1. **Use the round trip.** The round trip is 2l/v, so
   $$l = \frac{v \times 6\ \text{ns}}{2}$$
2. **Put in the speed.**
   $$\begin{aligned} l &= 0.66 \times 0.2998 \times 3\ \text{m} \\ &= 0.59\ \text{m} \end{aligned}$$

**Answer:** the load is 0.59 m away.
:::
:::

::: example
## What does the TDR read for a 25 Ω load, and for an open end?

::: solution
1. **25 Ω load.** Γ = −1/3, so the TDR reads
   $$\begin{aligned} V &= 0.5 \times \frac{2}{3} \\ &= 0.333\ \text{V} \end{aligned}$$
2. **Open end.** Γ = +1, so the TDR reads the full 1 V.
3. **Short.** A short gives 0.

**Answer:** 0.333 V for the 25 Ω load and the full 1 V for an open end.
:::
:::

::: example
## A TDR's step rises in 100 ps on coax with velocity factor 0.66. About how close can two discontinuities be and still be seen separately?

::: solution
1. **Separation needed.** Their reflections must be at least a rise time apart, and the signal travels out and back, so the resolution is
   $$\frac{v t_r}{2}$$
2. **Put in the numbers.**
   $$\begin{aligned} v &= 0.66 \times 3 \times 10^8\ \text{m/s} \\ \frac{v t_r}{2} &= \frac{v \times 100\ \text{ps}}{2} \\ &= 9.9\ \text{mm} \end{aligned}$$
3. **Faster edges.** Faster edges resolve finer detail.

**Answer:** about 9.9 mm.
:::
:::

::: check
kind: python

## Design the match, find its bandwidth, and confirm reflection coefficients with an FDTD line.

```python starter
import numpy as np

def antenna_z(f, R=25.0, Q=8.0, fr=2.45e9):
    # A resonant antenna modeled as a series RLC: Z = R + j*Q*R*(f/fr - fr/f).
    return R + 0j

def l_match(RL, Z0, f):
    # L-network for a resistive load RL < Z0: a series inductor next to the load with
    # reactance Q*RL, then a shunt capacitor across the line with reactance Z0/Q, where
    # Q = sqrt(Z0/RL - 1). Return (L in henries, C in farads) at frequency f.
    return 0.0, 0.0

def gamma(f, L, C, Z0=50.0):
    # Reflection coefficient seen from the line: the antenna in series with L, all in
    # parallel with C, compared with Z0.
    return 1.0 + 0j

def vswr2_band(L, C, Z0=50.0):
    # The lowest and highest frequencies (Hz) between 2.0 and 3.0 GHz where |gamma| < 1/3,
    # found on a grid of 1 MHz steps. Return (f_low, f_high).
    return 0.0, 0.0

def fdtd_reflection(RL, Z0=50.0, cells=200, dt=0.5):
    # 1D FDTD of a lossless line with one cell per unit length and L' = Z0, C' = 1/Z0 (speed 1),
    # V on cells + 1 nodes and I on the cells between them. Each step: update every I from the
    # V difference across it, then the interior V from the I difference. The end nodes hold
    # C'/2 and use the trapezoidal rule for their resistors; at node 0, driven by a 1 V step
    # through Z0: (C'/2)(V_new - V_old)/dt = (1 - (V_new + V_old)/2)/Z0 - I[0], and at the
    # last node, loaded by RL: (C'/2)(V_new - V_old)/dt = I[-1] - (V_new + V_old)/(2*RL).
    # Run 4*cells time units and return the mean of 2*V[0] - 1 over the last cells time units.
    return 0.0
```

```python solution
import numpy as np

def antenna_z(f, R=25.0, Q=8.0, fr=2.45e9):
    return R + 1j*Q*R*(f/fr - fr/f)

def l_match(RL, Z0, f):
    Q = np.sqrt(Z0/RL - 1)
    w = 2*np.pi*f
    return Q*RL/w, 1/(w*Z0/Q)

def gamma(f, L, C, Z0=50.0):
    w = 2*np.pi*f
    z = antenna_z(f) + 1j*w*L
    zin = 1/(1/z + 1j*w*C)
    return (zin - Z0)/(zin + Z0)

def vswr2_band(L, C, Z0=50.0):
    f = np.arange(2.0e9, 3.0e9 + 1, 1e6)
    ok = f[np.abs(gamma(f, L, C, Z0)) < 1/3]
    return float(ok.min()), float(ok.max())

def fdtd_reflection(RL, Z0=50.0, cells=200, dt=0.5):
    Lp, Cp = Z0, 1/Z0
    v = np.zeros(cells + 1)
    i = np.zeros(cells)
    steps = int(round(4*cells/dt))
    keep = int(round(cells/dt))
    c0 = Cp/(2*dt)
    total = 0.0
    for n in range(steps):
        i -= dt*(v[1:] - v[:-1])/Lp
        v[1:-1] -= dt*(i[1:] - i[:-1])/Cp
        v[0] = ((c0 - 1/(2*Z0))*v[0] + 1/Z0 - i[0])/(c0 + 1/(2*Z0))
        v[-1] = ((c0 - 1/(2*RL))*v[-1] + i[-1])/(c0 + 1/(2*RL))
        if n >= steps - keep:
            total += 2*v[0] - 1
    return total/keep
```

```python tests
_L, _C = l_match(25.0, 50.0, 2.45e9)
assert abs(_L - 1.6240e-9) < 1e-12 and abs(_C - 1.2992e-12) < 1e-15, f"Matching 25 ohms to 50 at 2.45 GHz takes 1.624 nH and 1.299 pF; got {_L*1e9:.4f} nH and {_C*1e12:.4f} pF."
assert abs(antenna_z(2.45e9) - 25) < 1e-9 and abs(antenna_z(2.6e9).imag - 8*25*(2.6/2.45 - 2.45/2.6)) < 1e-9, "The antenna is 25 ohms at resonance and reactive away from it."
assert abs(gamma(2.45e9, _L, _C)) < 1e-9, "At 2.45 GHz the matched antenna should reflect nothing."
assert abs(abs(gamma(2.45e9, 0.0, 0.0)) - 1/3) < 1e-9, "Without the network, the 25 ohm antenna reflects |gamma| = 1/3 at resonance."
_lo, _hi = vswr2_band(_L, _C)
assert abs(_lo - 2.349e9) < 1.5e6 and abs(_hi - 2.551e9) < 1.5e6, f"The matched antenna should stay under VSWR 2 from 2.349 to 2.551 GHz; got {_lo/1e9:.3f} to {_hi/1e9:.3f}."
for _R in (100.0, 25.0, 200.0):
    _g = fdtd_reflection(_R)
    assert abs(_g - (_R - 50)/(_R + 50)) < 2e-4, f"The FDTD line should measure gamma = {(_R - 50)/(_R + 50):.4f} for a {_R:.0f} ohm load; got {_g:.5f}."
```

::: right
Right. The network is 1.624 nH and 1.299 pF, the match holds from 2.349 to 2.551 GHz, and your FDTD line measures each load's Γ to within a few parts in a hundred thousand.
:::
:::

::: check
given: R = 10 | 25 | 35; Z = 50 | 75; f = 0.9 | 2.45
answer: sqrt(Z/R - 1)*R/(2*pi*f*1e9)*1e9
unit: nH
tolerance: 0.5%

## An antenna is a pure {R} Ω at {f} GHz. What series inductor does an L-network matching it to {Z} Ω need?

::: right
Right. $X_s = QR_L$ with $Q = \sqrt{Z_0/R_L - 1}$, so L = {answer} nH.
:::

::: misses
- [Z/sqrt(Z/R - 1)/(2*pi*f*1e9)*1e9] That's the shunt element's reactance turned into an inductance; the series element has $QR_L$.
- [any] Not yet. Q first, then $X_s$, then L.
:::
:::

::: check
given: V = 1 | 2; Z = 50 | 75; R = 10 | 25 | 150 | 300
answer: V/2*(1 + (R - Z)/(R + Z))
unit: V
tolerance: 0.5%

## A TDR sends a {V} V step through {Z} Ω into a {Z} Ω line ending in {R} Ω. What does it read after the reflection returns?

::: right
Right. $\frac{V_s}{2}(1 + \Gamma)$ = {answer} V.
:::

::: misses
- [V/2] That's before the reflection arrives.
- [any] Not yet. Launched voltage plus the reflection.
:::
:::

::: check
given: t = 2 | 6 | 20; v = 0.66 | 0.7 | 0.85
answer: v*0.299792458*t/2
unit: m
tolerance: 0.5%

## A reflection returns {t} ns after a TDR step, on a line with a velocity factor of {v}. How far away is the discontinuity?

::: right
Right. $vt/2$ = {answer} m.
:::

::: misses
- [v*0.299792458*t] The step goes there and back: halve it.
- [any] Not yet. Distance from the round-trip time.
:::
:::

::: check
kind: parts
given: t = 2 | 6 | 20; v = 0.66 | 0.8

## A TDR's reflection returns {t} ns after the step, on cable with velocity factor {v}.

::: part
answer: v*3e8*t*1e-9/2
unit: m
tolerance: 0.5%

### How far away is the discontinuity?

::: misses
- [v*3e8*t*1e-9] Out and back: halve it.
- [any] $vt/2$.
:::
:::

::: part
answer: v*3e8*100e-12/2*1000
unit: mm
tolerance: 0.5%

### With a 100 ps rise time, about what is its resolution?

::: misses
- [any] $vt_r/2$.
:::
:::
:::

::: check
kind: parts
given: Z = 0 | 25 | 75 | 100; V = 0.5 | 1

## A TDR launches a {V} V step into 50 Ω line ending in {Z} Ω.

::: part
answer: (Z - 50)/(Z + 50)
tolerance: 0.5%

### What is Γ at the end?

::: misses
- [any] $(Z - 50)/(Z + 50)$.
:::
:::

::: part
answer: V*(1 + (Z - 50)/(Z + 50))
unit: V
tolerance: 0.5%

### What level does the TDR settle at after the reflection returns?

::: misses
- [any] $V(1 + \Gamma)$.
:::
:::
:::

::: explain
## Why does a matched L-network work only over a limited band around the antenna's resonance?

::: model
The L-network is designed for one impedance: the antenna's pure resistance at resonance. Away from resonance the antenna adds a reactance that grows in proportion to its Q and to how far the frequency has moved, and the network's own inductor and capacitor change reactance with frequency too. Together these shift the transformed impedance off the center of the Smith chart, so the reflection grows on both sides of the design frequency. The band over which it stays acceptable is set mostly by the antenna's Q, about its center frequency divided by Q, and adding the network's own Q narrows it a little more, which is why high-Q antennas are hard to match over wide bands.
:::
:::

::: practice

::: check
given: t = 0.5 | 100; v = 0.6 | 0.9
answer: v*0.299792458*t/2
unit: m
tolerance: 0.5%

## TDR distance: {t} ns, velocity factor {v}?

::: misses
- [any] $vt/2$.
:::
:::

::: check
given: V = 0.5 | 5; R = 1 | 10 | 25 | 100 | 200 | 1000
answer: V/2*(1 + (R - 50)/(R + 50))
unit: V
tolerance: 0.5%

## TDR reading: {V} V step, 50 Ω system, {R} Ω load?

::: misses
- [any] $\frac{V_s}{2}(1 + \Gamma)$.
:::
:::
:::
