---
title: Switches and phase shifters
heading: PIN-diode series and shunt switches, switched-line and reflection phase shifters, and digital bits
eyebrow: S6 · Lesson 27 · Switches and phase shifters
xp: 50
---

::: hook
A phased array steers its beam with a phase shifter behind every element, a radar's receiver is protected by a switch while its transmitter fires, and a phone switches its antenna between a dozen bands. All of these are built from devices that toggle between a low and a high impedance, most often PIN diodes or FET switches, arranged so that one state passes the signal and the other blocks or delays it. The limits are set by the device's on-resistance and off-capacitance, which this lesson turns into insertion loss, isolation and phase.
:::

::: play
- The curve is the isolation of a series switch in the off state, a capacitance $C_\text{off}$ between two 50 Ω lines: $10\log_{10}\left(1 + \frac{1}{(2\omega C_\text{off}Z_0)^2}\right)$.
- At low frequency the capacitor blocks well; as frequency rises it leaks, falling about 6 dB per octave.
- A 0.1 pF switch isolates 18 dB at 2 GHz but only 5.5 dB at 10 GHz, which is why high-frequency switches put their diodes in shunt.
:::

```sim plot
view: graph
x: f = 0.1..40 GHz log
y: I = 0..60 dB
slider: C = 0.02..0.5 = 0.1 pF log
plot: 10*log(1 + 1/(2*2*pi*f*1e9*C*1e-12*50)^2) | label: series isolation
```

::: predict
## A PIN diode with 1.5 Ω on and 0.1 pF off is mounted in shunt across a 50 Ω line. How well does it isolate when on, and how much does it cost when off, at 2 GHz?

- [ ] About 6 dB of isolation and 1 dB of loss
- [x] About 25 dB of isolation and under 0.01 dB of loss
- [ ] About 50 dB of isolation and 3 dB of loss
- [ ] It can't isolate at all in shunt

::: reveal
On, the 1.5 Ω shunt reflects most of the wave: isolation $20\log_{10}(1 + Z_0/2R_s) = 24.9$ dB. Off, 0.1 pF has 796 Ω of reactance, a light load: loss $10\log_{10}(1 + (\omega CZ_0/2)^2) = 0.004$ dB. Two shunt diodes a quarter wave apart roughly double the isolation.
:::
:::

::: nameit
## Switch elements

A **PIN diode** forward biased is a small resistance $R_s$ (about 1 Ω); reverse biased, it is a small capacitance $C_j$ (about 0.1 pF), with some series inductance. FET switches behave similarly ($R_\text{on}$, $C_\text{off}$). From lesson 2's series and shunt elements in a $Z_0$ system:

- **Series switch**: on, loss $20\log_{10}\left(1 + \frac{R_s}{2Z_0}\right)$; off, isolation $10\log_{10}\left(1 + \frac{X^2}{4Z_0^2}\right)$ with $X = 1/\omega C_j$.
- **Shunt switch**: on, isolation $20\log_{10}\left(1 + \frac{Z_0}{2R_s}\right)$; off, loss $10\log_{10}\left(1 + \left(\frac{\omega C_jZ_0}{2}\right)^2\right)$.

An SPDT switch uses two arms, each a quarter wave from the junction, so the off arm's short becomes an open there. Series inductance can be resonated against $C_j$ to restore isolation at one frequency.

## Phase shifters

- **Switched line**: switch between two paths differing in length by Δℓ: $\Delta\phi = \beta\Delta\ell$, which grows in proportion to frequency (it is really a time delay).
- **Reflection type**: a 90° hybrid with identical reactances X on its two coupled ports reflects the whole signal to the fourth port with phase $\pi - 2\arctan(X/Z_0)$. Switching between $X_1$ and $X_2$ gives
$$\Delta\phi = 2\left[\arctan\frac{X_2}{Z_0} - \arctan\frac{X_1}{Z_0}\right]$$
and symmetric states $\pm X$ give a bit of $\Delta\phi$ when $X = Z_0\tan(\Delta\phi/4)$. Varactors make it continuously variable.
- **Loaded line**: small shunt susceptances switched at points a quarter wave apart, for bits of 45° or less.

A **B-bit digital phase shifter** cascades bits of 180°, 90°, 45°, … down to $360°/2^B$; its insertion loss is the sum of the bits' losses and varies from state to state, which arrays calibrate out.
:::

::: example
## A PIN diode with $R_s$ = 1.5 Ω and $C_j$ = 0.1 pF is mounted in series in a 50 Ω line. Find its on loss and off isolation at 2 and 10 GHz.

::: solution
1. **On loss.** At any frequency,
   $$20\log_{10}(1 + 1.5/100) = 0.13\ \text{dB}$$
2. **Off at 2 GHz.**
   $$\begin{aligned} X &= 1/(\omega C_j) \\ &= 796\ \Omega \\ \text{isolation} &= 10\log_{10}\left(1 + \frac{796^2}{100^2}\right) \\ &= 18.1\ \text{dB} \end{aligned}$$
3. **Off at 10 GHz.** X = 159 Ω, and the isolation is only 5.5 dB.
4. **Fixes.** Resonating $C_j$ with a parallel inductor restores isolation over a narrow band; shunt mounting avoids the problem.

**Answer:** 0.13 dB of loss when on; off, 18.1 dB of isolation at 2 GHz but only 5.5 dB at 10 GHz.
:::
:::

::: example
## A reflection phase shifter in 50 Ω switches its reactances between −j25 Ω and −j100 Ω. What phase step does it give, and what symmetric reactances would give exactly 90°?

::: solution
1. **Reflected phases.**
   $$\begin{aligned} 180° - 2\arctan(-0.5) &= 233.1° \\ 180° - 2\arctan(-2) &= 306.9° \end{aligned}$$
2. **Phase step.** The two states differ by a 73.7° step.
3. **Symmetric states for 90°.** With states ±X,
   $$\begin{aligned} X &= 50\tan22.5° \\ &= 20.7\ \Omega \end{aligned}$$
   so switch between +j20.7 Ω (an inductor) and −j20.7 Ω (a capacitor).

**Answer:** a 73.7° step; switching between +j20.7 Ω and −j20.7 Ω would give exactly 90°.
:::
:::

::: example
## A 45° switched-line bit is designed at 10 GHz on alumina microstrip with $\varepsilon_\text{eff}$ = 6.6. How much longer is its delay arm, and what does the bit give at 11 GHz?

::: solution
1. **Guided wavelength.**
   $$\begin{aligned} \lambda_g &= \frac{29.98\ \text{mm}}{\sqrt{6.6}} \\ &= 11.67\ \text{mm} \end{aligned}$$
2. **Extra length.**
   $$\begin{aligned} \Delta\ell &= \lambda_g/8 \\ &= 1.46\ \text{mm} \end{aligned}$$
3. **At 11 GHz.** The same length is 10% more of a wavelength: 49.5°, a 4.5° error.
4. **Why that's useful.** That frequency dependence is exactly what makes switched lines useful as true-time-delay bits in wideband arrays (S5 lesson 34).

**Answer:** the delay arm is 1.46 mm longer, and at 11 GHz the bit gives 49.5°, a 4.5° error.
:::
:::

::: check
kind: parts
given: R = 0.5 | 1.5 | 4; C = 0.05 | 0.1 | 0.3; f = 1 | 5 | 20

## A switch with {R} Ω on and {C} pF off is mounted in series between 50 Ω lines, at {f} GHz.

::: part
answer: 20*log(1 + R/100)
unit: dB
tolerance: 0.5%

### What is its insertion loss when on?

::: misses
- [any] $20\log_{10}(1 + R_s/2Z_0)$.
:::
:::

::: part
answer: 10*log(1 + (1/(2*pi*f*1e9*C*1e-12))^2/10000)
unit: dB
tolerance: 0.5%

### What is its isolation when off?

::: misses
- [any] $10\log_{10}(1 + X^2/4Z_0^2)$ with $X = 1/\omega C$.
:::
:::
:::

::: check
kind: parts
given: R = 0.5 | 1.5 | 4; C = 0.05 | 0.1 | 0.3; f = 1 | 5 | 20

## A switch with {R} Ω on and {C} pF off is mounted in shunt across a 50 Ω line, at {f} GHz.

::: part
answer: 20*log(1 + 25/R)
unit: dB
tolerance: 0.5%

### What is its isolation when on?

::: misses
- [20*log(25/R)] Close, but it's $1 + Z_0/2R_s$.
- [any] $20\log_{10}(1 + Z_0/2R_s)$.
:::
:::

::: part
answer: 10*log(1 + (2*pi*f*1e9*C*1e-12*25)^2)
unit: dB
tolerance: 1%

### What is its insertion loss when off?

::: misses
- [any] $10\log_{10}(1 + (\omega CZ_0/2)^2)$.
:::
:::
:::

::: check
kind: parts
given: a = -100 | -50 | -20; b = 10 | 30 | 80

## A reflection phase shifter in 50 Ω switches its reactances between {a} Ω and {b} Ω.

::: part
answer: 180 - 2*atan(a/50)*180/pi
unit: °
tolerance: 0.5%

### What phase does it reflect in the {a} Ω state?

::: misses
- [any] $180° - 2\arctan(X/Z_0)$.
:::
:::

::: part
answer: 2*(atan(b/50) - atan(a/50))*180/pi
unit: °
tolerance: 0.5%

### How big is the phase step between the two states?

::: misses
- [any] $2[\arctan(X_2/Z_0) - \arctan(X_1/Z_0)]$, in magnitude.
:::
:::
:::

::: check
kind: parts
given: p = 22.5 | 45 | 90 | 180; Z = 50 | 75

## A reflection phase shifter in {Z} Ω uses symmetric reactances ±X for a {p}° bit.

::: part
answer: Z*tan(p/4*pi/180)
unit: Ω
tolerance: 0.5%

### What is X?

::: misses
- [Z*tan(p/2*pi/180)] Each state's phase moves by twice the arctangent, and the two states are symmetric: $X = Z_0\tan(\Delta\phi/4)$.
- [any] $Z_0\tan(\Delta\phi/4)$.
:::
:::
:::

::: check
kind: parts
given: p = 22.5 | 45 | 90; f = 3 | 10 | 28; e = 1.9 | 6.6; r = 0.9 | 1.15

## A {p}° switched-line bit is designed at {f} GHz on microstrip with $\varepsilon_\text{eff}$ = {e}.

::: part
answer: p/360*299.792458/(f*sqrt(e))
unit: mm
tolerance: 0.5%

### How much longer is its delay arm?

::: misses
- [any] $(\Delta\phi/360°)\lambda_g$.
:::
:::

::: part
answer: p*r
unit: °
tolerance: 0.5%

### What phase does it give at {r} times the design frequency?

::: misses
- [p] A fixed length gives a phase proportional to frequency.
- [any] Δφ scales with f.
:::
:::
:::

::: check
kind: parts
given: B = 3 | 4 | 6; L = 0.3 | 0.6 | 1

## A {B}-bit phase shifter is built from bits that each lose {L} dB in their delay state.

::: part
answer: 360/2^B
unit: °
tolerance: 0.5%

### What is its smallest step?

::: misses
- [any] $360°/2^B$.
:::
:::

::: part
answer: B*L
unit: dB
tolerance: 0.5%

### What is its worst-case loss, with every bit in its delay state?

::: misses
- [any] The bits' losses add.
:::
:::
:::

::: check
kind: choice

## Why do switch designs at high microwave frequencies favor shunt-mounted diodes over series ones?

- [ ] Shunt diodes are cheaper
- [x] Off-state isolation of a series diode depends on its tiny capacitance blocking the signal, and that capacitance's reactance falls with frequency; a shunt diode isolates by its low on-resistance, which doesn't degrade with frequency, and its off-capacitance only lightly loads the line
- [ ] Series diodes can't carry DC bias
- [ ] Shunt diodes have no resistance

::: misses
- [1] Cost is similar; the reason is electrical.
- [3] Bias can be fed to either through RF chokes.
- [4] Their on-resistance sets the isolation.
:::
:::

::: check
kind: derivation
vars: R = 0.2..10, C = 1e-14..1e-12, w = 1e9..2e11, Z = 25..100

## A switch with on-resistance R and off-capacitance C works at angular frequency w in a Z system.

::: step
answer: 20*log(1 + R/(2*Z))

### What does it lose in series, when on?
:::

::: step
answer: 10*log(1 + 1/(2*w*C*Z)^2)

### What does it isolate in series, when off?
:::

::: step
answer: 20*log(1 + Z/(2*R))

### What does it isolate in shunt, when on?
:::

::: right
Right. The product $R_sC_j$ is the switch's figure of merit: its cutoff frequency $1/(2\pi R_sC_j)$ bounds how good both states can be at once.
:::
:::

::: check
kind: python

## Write `reflect_phase(X, z0)`: the reflected phase in degrees from a hybrid terminated in reactances X, and `bit_reactance(dphi, z0)`: the symmetric X for a bit of dphi degrees. Check that ±X gives exactly dphi.

```python starter
def reflect_phase(X, z0):
    return 0.0

def bit_reactance(dphi, z0):
    return z0
```

```python solution
import math

def reflect_phase(X, z0):
    return 180 - 2 * math.degrees(math.atan(X / z0))

def bit_reactance(dphi, z0):
    return z0 * math.tan(math.radians(dphi / 4))
```

```python tests
assert abs(reflect_phase(-100, 50) - reflect_phase(-25, 50) - 73.74) < 0.01, "The worked example: 73.7°."
for d in (22.5, 45, 90, 180):
    x = bit_reactance(d, 50)
    assert abs(reflect_phase(-x, 50) - reflect_phase(x, 50) - d) < 1e-9, "±X gives the bit."
assert abs(bit_reactance(90, 50) - 20.71) < 0.01, "90° needs ±20.7 Ω."
```

::: right
Right. A 180° bit needs ±50 Ω here; a short and an open (X = 0 and ∞) also differ by 180°, which is why switching between them works for that bit too.
:::
:::

::: explain
## Why is a switched-line phase shifter really a time-delay device, and why does that matter in a wideband array?

::: model
A switched-line bit changes the signal's path length by a fixed amount, which delays it by a fixed time. A fixed time delay produces a phase shift proportional to frequency, so the bit is exactly right at its design frequency and grows or shrinks away from it. For steering a phased array, the right correction across a wide band is precisely a time delay, because the path differences between elements are fixed distances, so switched lines act as true time delay and avoid beam squint. Reflection and loaded-line phase shifters instead give a nearly constant phase over their band, which is ideal for narrowband arrays but squints in wideband ones.
:::
:::

::: practice
::: check
given: R = 1 | 3; f = 2 | 8
answer: 20*log(1 + 25/R)
unit: dB
tolerance: 0.5%

## Shunt isolation of a {R} Ω switch in 50 Ω?

::: misses
- [any] $20\log_{10}(1 + Z_0/2R_s)$.
:::
:::

::: check
given: p = 11.25 | 45 | 90; Z = 50 | 100
answer: Z*tan(p/4*pi/180)
unit: Ω
tolerance: 0.5%

## Symmetric reactance for a {p}° reflection bit in {Z} Ω?

::: misses
- [any] $Z_0\tan(\Delta\phi/4)$.
:::
:::

::: check
given: p = 45 | 180; f = 5 | 15; e = 2.5 | 7
answer: p/360*299.792458/(f*sqrt(e))
unit: mm
tolerance: 0.5%

## Switched-line extra length for {p}° at {f} GHz, εeff {e}?

::: misses
- [any] $(\Delta\phi/360°)\lambda_g$.
:::
:::
:::
