<!-- TE10 Studio documentation: /docs/app/rf-tools -->
# RF tools

**Tools › Macros** (and the **Macros** group on the Home tab) holds ready-made RF tools. Each opens
a small window. Calculators update as you type; the other tools show what they will build and add it to
the model with **Build** / **Add Port**: one undo step. Lengths are in mm, frequencies in GHz.

## Calculators

![Microstrip calculator](/docs/img/app/dlg-tool-calc-microstrip.webp)


| Tool | Gives |
|---|---|
| Microstrip | Z0 and εeff (Hammerstad–Jensen with strip thickness; Kirschning–Jansen dispersion at a frequency), guided wavelength, electrical length; or the width for a target Z0 |
| Stripline | Z0 of a centred strip (Cohn, exact for zero thickness); or the width for a target Z0 |
| Coplanar waveguide | CPW and grounded (conductor-backed) CPW by conformal mapping; or the centre width for a target Z0 |
| Coax | Z0 from the diameters, or the outer diameter for a target Z0; TE11 onset |
| Waveguide | Mode cutoffs of a standard (WR-430 … WR-10) or custom rectangular guide, or a circular guide; single-mode band; λg, β and wave impedance at a frequency |
| Skin depth and wavelength | Skin depth and surface resistance of common metals (or any σ); wavelength in a dielectric |
| Patch antenna | Rectangular patch W and L, fringing, edge resistance and the inset depth for the feed impedance |

Checked against published values: 50 Ω on 1.6 mm FR-4 is 3.06 mm wide; Pozar's stripline example
(b = 3.2 mm, εr 2.2, 50 Ω → 2.66 mm); Balanis' patch example (10 GHz, εr 2.2: W 11.86 mm, L 9.06 mm,
edge resistance 228 Ω, inset 3.13 mm).

## Ports

**Wave Port Wizard** (also: right-click a trace → *Add Port at Line End…*, or the **Ports & Sources** node).
Pick the trace and the line type (microstrip, stripline, CPW, grounded CPW). The wizard reads the trace
width and thickness, the substrate height and εr (the dielectric under the trace; its bottom is the
ground), the stripline ground spacing and the CPW gap from the model; any of them can be typed in instead.
It sizes the port by the usual guidelines:

| Line | Port width | Port height |
|---|---|---|
| Microstrip | 10·w (5·w or 4·h if w < h) | 6·h to 10·h from the ground (10·h for low εr) |
| Stripline | 8·w (5·w or 3·b if w < b) | the ground spacing b |
| CPW | 5·(w + 2s) | 4·(w + 2s) above and below the strip |
| Grounded CPW | 5·(w + 2s) | max(6·h, h + 3·(w + 2s)) from the ground |

A wave port must lie on the model's outer boundary: the wizard picks the end of the trace that is on it
(or tells you if neither is). If there is no air above the board, it adds an air box up to the port's top.
The port is clipped to the model's cross-section, with a note. **Lumped Port Wizard**: a port from the
ground up to the trace, at either end (inside the model is fine).

## Build

![Patch antenna builder](/docs/img/app/dlg-tool-build-patch.webp)


| Tool | Builds |
|---|---|
| Microstrip Line | A line of the given impedance on its board, wave ports at both ends |
| Quarter-Wave Transformer | Source line, √(Zs·ZL) λg/4 section, load line; ports at both ends |
| Tapered Line | Linear, exponential or Klopfenstein taper between two impedances |
| Branch-Line Coupler | 3 dB 90° hybrid with four ports |
| Patch Antenna | Inset-fed patch, ground, λ/4 radiation box, wave port at the board edge |
| Waveguide Section | Standard or custom rectangular guide, ports on both ends |
| Coax Section | Coax sized for an impedance, ports on both ends |

Each also adds a frequency sweep around its design frequency and makes it the active setup.

The same tools are plain Python functions: see [RF tools in the API](/docs/api/rftools-materials).
