---
title: Beamforming hardware
heading: Phase shifters and beam squint, true time delay, phase quantization and digital arrays
eyebrow: S5 · Lesson 34 · Beamforming hardware
xp: 50
---

::: hook
Lesson 32 steered an array by giving each element a progressive phase. Hardware has to supply that phase, and the way it does so has consequences. A phase shifter's setting is correct at one frequency only, so a wideband signal's beam points in slightly different directions at different frequencies; true time delays fix that at a cost in size. Digital phase shifters have a few bits, and the rounding wastes gain and raises sidelobes. And a fully digital array, with a converter behind every element, can form many beams at once but has to move terabits per second. This lesson puts numbers on each choice.
:::

::: play
- The curve is the direction a phase-steered array actually points against frequency, $\sin\theta = (f_0/f)\sin\theta_0$, for a beam set to $\theta_0$ at $f_0$: **beam squint**.
- The dashed line is a true-time-delay array, which points at $\theta_0$ at every frequency.
- Squint is zero at broadside and grows with the steering angle; for wideband signals it smears the beam across the band.
:::

```sim plot
view: graph
x: r = 0.8..1.2
y: t = 0..90 °
slider: s = 5..70 = 45 °
plot: asin(sin(s*pi/180)/r)*180/pi | label: phase shifters
plot: s + 0*r | dashed | label: true time delay
```

::: predict
## A phase-steered array is pointed 45° from broadside at its design frequency. Where does it point at a frequency 10% higher?

- [ ] Still at 45°
- [x] At about 40°
- [ ] At about 50°
- [ ] At about 34°

::: reveal
Phase shifters supply the right phase for $f_0$; at $1.1f_0$ the same phases correspond to $\sin\theta = \sin45°/1.1 = 0.643$, so θ = 40.0°: the beam squints 5° toward broadside. The small-angle estimate $(\Delta f/f)\tan\theta_0$ gives 5.7°.
:::
:::

::: nameit
## Phase shifters and squint

Steering to $\theta_0$ needs a phase step $\beta = -kd\sin\theta_0$ between elements. A phase shifter holds β fixed as frequency changes, so the beam points at $\sin\theta = (f_0/f)\sin\theta_0$, squinting by about
$$\Delta\theta \approx -\frac{\Delta f}{f_0}\tan\theta_0$$
Keeping the squint within half the beamwidth across a bandwidth Δf limits the **instantaneous bandwidth** to about $\frac{\Delta f}{f_0} \approx \frac{0.886\lambda}{2L\sin\theta_0}$ for an aperture of length L.

## True time delay

Delaying element n by $\tau_n = nd\sin\theta_0/c$ aligns the wavefront at every frequency: no squint. The longest delay across an aperture of length L is $L\sin\theta_0/c$, a few nanoseconds for a meter-sized array.

## Quantized phase

A B-bit phase shifter has steps of $2\pi/2^B$. Rounding the required phases leaves errors spread evenly over ±half a step, an rms error $\sigma = \pi/(\sqrt3\cdot2^B)$, which costs about $e^{-\sigma^2}$ of the gain (0.22 dB at 3 bits) and, where the errors repeat periodically across the array, quantization lobes. Randomizing the rounding breaks up the lobes.

## Digital arrays

Digitizing every element lets the processor form any number of beams in software, with true time delay applied digitally. The cost is data: N elements at a sample rate $f_s$ with b-bit I and Q samples move $2Nf_sb$ bits a second.
:::

::: example
## A 1 m array steered to 60° uses true time delay. What is the longest delay it needs?

::: solution
1. **Longest delay.**
   $$\begin{aligned} \tau &= \frac{L\sin\theta_0}{c} \\ &= \frac{1 \times 0.866}{3 \times 10^8}\ \text{s} \\ &= 2.9\ \text{ns} \end{aligned}$$
   about 87 cm of air or 60 cm of PTFE cable.
2. **How it's supplied.** Switched delay lines in binary steps supply it. At 10 GHz the same steering with phase shifters needs only up to 360° per element, which is far more compact but squints.

**Answer:** the longest delay is 2.9 ns.
:::
:::

::: example
## An array uses 3-bit phase shifters. What rms phase error and gain loss does quantization cause?

::: solution
1. **Phase step.** Three bits give steps of 45°.
2. **RMS phase error.**
   $$\begin{aligned} \sigma &= \frac{\pi}{\sqrt{3} \times 8} \\ &= 0.227\ \text{rad} \end{aligned}$$
   which is 13°.
3. **Gain loss.** The gain falls by
   $$e^{-\sigma^2} = e^{-0.0514}$$
   which is 0.22 dB.
4. **More bits.** Each extra bit cuts the loss by four: 0.06 dB at 4 bits. Bits matter more for the sidelobe level than for gain.

**Answer:** an rms phase error of 0.227 rad (13°) and a gain loss of 0.22 dB.
:::
:::

::: example
## A digital array has 64 elements sampled at 1 GS/s with 12-bit I and Q. How much data does it produce?

::: solution
1. **Data rate.**
   $$\begin{aligned} R &= 2 \times 64 \times 10^9 \times 12\ \text{b/s} \\ &= 1.5\ \text{Tb/s} \end{aligned}$$
2. **What designers do.** That is why digital arrays at high bandwidths do much of their beamforming in the converters' own logic, or digitize subarrays rather than single elements.

**Answer:** the array produces 1.5 Tb/s.
:::
:::

::: check
kind: parts
given: t = 20 | 45 | 60; r = 0.9 | 0.95 | 1.05 | 1.1

## A phase-steered array points at {t}° at its design frequency; the signal is at {r} times that frequency.

::: part
answer: asin(sin(t*pi/180)/r)*180/pi
unit: °
tolerance: 0.5%

### Where does the beam point?

::: misses
- [any] $\sin\theta = (f_0/f)\sin\theta_0$.
:::
:::

::: part
answer: -(r - 1)*tan(t*pi/180)*180/pi
unit: °
tolerance: 0.5%

### What squint does the small-angle estimate give?

::: misses
- [any] $-(\Delta f/f_0)\tan\theta_0$.
:::
:::
:::

::: check
kind: parts
given: L = 0.2 | 1 | 5; t = 30 | 60; N = 16 | 64

## A {L} m array of {N} elements is steered to {t}° with true time delay.

::: part
answer: L*sin(t*pi/180)/299792458*1e9
unit: ns
tolerance: 0.5%

### What is the longest delay it needs?

::: misses
- [any] $L\sin\theta_0/c$.
:::
:::

::: part
answer: L/(N - 1)*sin(t*pi/180)/299792458*1e12
unit: ps
tolerance: 0.5%

### What delay step separates neighboring elements?

::: misses
- [any] $d\sin\theta_0/c$ with $d = L/(N - 1)$.
:::
:::
:::

::: check
kind: parts
given: B = 2 | 3 | 4 | 5

## An array uses {B}-bit phase shifters.

::: part
answer: pi/(sqrt(3)*2^B)*180/pi
unit: °
tolerance: 0.5%

### What rms phase error does quantization leave?

::: misses
- [360/2^B] That's the step size; the rms error over ±half a step is step/√12.
- [any] $\pi/(\sqrt3\cdot2^B)$.
:::
:::

::: part
answer: -10*log(exp(-(pi/(sqrt(3)*2^B))^2))
unit: dB
tolerance: 0.5%

### How much gain does it cost?

::: misses
- [any] $e^{-\sigma^2}$ in dB.
:::
:::
:::

::: check
kind: parts
given: N = 16 | 64 | 256; f = 0.5 | 2; b = 8 | 12

## A digital array has {N} elements sampled at {f} GS/s with {b}-bit I and Q.

::: part
answer: 2*N*f*b
unit: Gb/s
tolerance: 0.5%

### How much data does it produce?

::: misses
- [N*f*b] Count both I and Q.
- [any] $2Nf_sb$.
:::
:::
:::

::: check
kind: choice

## A radar must steer a 2 GHz-wide pulse across a wide scan. Why does it need true time delay rather than phase shifters?

- [ ] Phase shifters can't produce more than 180°
- [x] With phase shifters the beam direction varies across the 2 GHz band (squint), smearing the beam; delays steer every frequency to the same angle
- [ ] Time delays have lower loss than phase shifters
- [ ] Phase shifters only work at broadside

::: misses
- [1] They cover 360°; the problem is that phase is right at one frequency only.
- [3] Delay lines are usually lossier and larger; they're used despite that.
- [4] Phase shifters steer fine at one frequency; wide bandwidth is the issue.
:::
:::

::: check
kind: derivation
vars: t = 0.05..1.3, r = 0.8..1.2, L = 0.05..10, l = 0.001..1

## An array of length L, at wavelength l, is phase-steered to t radians; the signal is at r times the design frequency.

::: step
answer: asin(sin(t)/r)

### Where does the beam point?
:::

::: step
answer: 0.886*l/(L*cos(t))

### What is the beamwidth at the steering angle?
:::

::: step
answer: 0.886*l/(2*L*sin(t))

### What fractional bandwidth keeps the squint within half that beamwidth?
:::

::: right
Right. Large apertures and wide scans have the least instantaneous bandwidth with phase shifters.
:::
:::

::: check
kind: python

## Write `quant_loss_db(N, d, theta0_deg, bits)`: the gain loss, in dB, of an N-element array spaced d wavelengths and steered to theta0 when each element's ideal phase $-2\pi dn\sin\theta_0$ is rounded to the nearest of $2^{\text{bits}}$ levels (compare $|\sum e^{j\text{error}_n}|^2/N^2$ with 1).

```python starter
def quant_loss_db(N, d, theta0_deg, bits):
    return 0.0
```

```python solution
import cmath, math

def quant_loss_db(N, d, theta0_deg, bits):
    q = 2 * math.pi / 2 ** bits
    s = 0
    for n in range(N):
        ideal = -2 * math.pi * d * n * math.sin(math.radians(theta0_deg))
        s += cmath.exp(1j * (round(ideal / q) * q - ideal))
    return -10 * math.log10(abs(s) ** 2 / N ** 2)
```

```python tests
import math
for B in (3, 4):
    sig = math.pi / (math.sqrt(3) * 2 ** B)
    assert abs(quant_loss_db(64, 0.5, 23, B) - 10 * math.log10(math.exp(sig * sig))) < 0.02, "The rms model predicts the loss within 0.02 dB."
assert quant_loss_db(64, 0.5, 30, 2) < 1e-9, "At 30° every phase is a multiple of 90°: no error at all."
```

::: right
Right. Some steering angles happen to need only exact steps, but in general the rounding behaves like random noise.
:::
:::

::: explain
## Why does a phase-steered array's beam move when the signal's frequency changes?

::: model
To steer a beam, each element must compensate for the extra distance the wave travels to reach it at the steering angle, an extra time delay that grows along the array. A phase shifter supplies a fixed phase equal to that delay only at its design frequency, since a time delay corresponds to a phase proportional to frequency. At a different frequency the fixed phases correspond to a different delay, which steers the beam to a different angle, closer to broadside above the design frequency and farther below it. True time-delay lines supply the delay itself, which is correct at every frequency, so the beam stays put.
:::
:::

::: practice
::: check
given: t = 30 | 50; r = 0.93 | 1.07
answer: asin(sin(t*pi/180)/r)*180/pi
unit: °
tolerance: 0.5%

## Beam angle for {t}° at {r} × the design frequency, phase-steered?

::: misses
- [any] $\sin\theta = \sin\theta_0/r$.
:::
:::

::: check
given: L = 0.5 | 3; t = 45 | 70
answer: L*sin(t*pi/180)/299792458*1e9
unit: ns
tolerance: 0.5%

## Longest true delay, {L} m array at {t}°?

::: misses
- [any] $L\sin\theta_0/c$.
:::
:::

::: check
given: B = 2 | 3 | 4 | 5 | 6
answer: -10*log(exp(-(pi/(sqrt(3)*2^B))^2))
unit: dB
tolerance: 0.5%

## Gain loss from {B}-bit phase quantization?

::: misses
- [any] $e^{-\sigma^2}$, $\sigma = \pi/(\sqrt3\cdot2^B)$.
:::
:::
:::
