---
title: PAM and QAM
heading: Multilevel amplitude modulation and square QAM constellations, their average energy, symbol and bit error rates, the Eb/N0 each needs, and spectral efficiency
eyebrow: S8 · Lesson 16 · PAM and QAM
xp: 50
---

::: hook
To send more bits per hertz, put more points in the constellation. Pulse-amplitude modulation uses several levels on one axis; quadrature amplitude modulation uses a grid on two, which is the same as two independent PAM signals on the cosine and sine carriers. Cable modems, Wi-Fi and microwave backhaul all climb the QAM ladder, 16, 64, 256, 1024 points, as far as the signal-to-noise ratio allows. Each step up adds bits per symbol and costs energy per bit, and the error-rate formulas say exactly how much.
:::

::: play
- Bit error probability against Eb/N0 for Gray-coded square QAM with 4, 16, 64 and 256 points (nearest-neighbor approximation).
- At 10⁻⁵, QPSK (4-QAM) needs 9.6 dB, 16-QAM 13.4 dB, 64-QAM 17.8 dB and 256-QAM 22.5 dB.
- Each pair of extra bits per symbol costs 4 to 5 dB more per bit; the reward is twice the throughput in the same bandwidth for every two bits.
:::
:::

```sim plot
view: graph
x: E = 0..28 dB
y: P = 1e-8..0.5 log
plot: 4*(1 - 1/2)*Q(sqrt(3*2*10^(E/10)/3))/2 | samples: 400 | label: 4-QAM (QPSK)
plot: 4*(1 - 1/4)*Q(sqrt(3*4*10^(E/10)/15))/4 | samples: 400 | color: ch2 | label: 16-QAM
plot: 4*(1 - 1/8)*Q(sqrt(3*6*10^(E/10)/63))/6 | samples: 400 | color: ch3 | label: 64-QAM
plot: 4*(1 - 1/16)*Q(sqrt(3*8*10^(E/10)/255))/8 | samples: 400 | dashed | label: 256-QAM
plot: 1e-5 | dashed | color: ch3 | label: 10⁻⁵
```

::: predict
## A cable channel 6 MHz wide uses 64-QAM with rolloff 0.12. Roughly what bit rate does it carry?

- [ ] 6 Mb/s
- [ ] 12 Mb/s
- [x] About 32 Mb/s
- [ ] 64 Mb/s

::: reveal
The symbol rate is $B/(1 + \beta)$ = 6/1.12 = 5.36 Mbaud, and 64-QAM carries 6 bits per symbol: 32 Mb/s, about 5.4 bits/s/Hz. 256-QAM in the same channel would give 43 Mb/s, needing about 4.7 dB more Eb/N0.
:::
:::

::: nameit
## M-ary PAM

Levels at ±d, ±3d, …, ±(M − 1)d. Average energy $E_s = \frac{(M^2 - 1)d^2}{3}$, inner points have 2 neighbors and the outer ones 1:

$$P_s = 2\left(1 - \frac{1}{M}\right)Q\left(\sqrt{\frac{6\log_2M}{M^2 - 1}\cdot\frac{E_b}{N_0}}\right)$$

## Square M-QAM

Two $\sqrt{M}$-PAM signals in quadrature. Average energy $E_s = \frac{2(M - 1)d^2}{3}$, and

$$P_s \approx 4\left(1 - \frac{1}{\sqrt{M}}\right)Q\left(\sqrt{\frac{3\log_2M}{M - 1}\cdot\frac{E_b}{N_0}}\right), \qquad P_b \approx \frac{P_s}{\log_2M}$$

with Gray coding. M-QAM needs the same Eb/N0 as $\sqrt{M}$-PAM for the same error rate and carries twice the bits, which is why QAM, not PAM, fills passband channels.

## Spectral efficiency

$\log_2M$ bits per symbol; with raised-cosine pulses of rolloff β, $\frac{\log_2M}{1 + \beta}$ bits/s/Hz at passband. Going from 16- to 64-QAM adds 2 bits per symbol for about 4.4 dB more Eb/N0; from 64 to 256, 2 bits for 4.7 dB more.
:::

::: example
## What does 16-QAM need for $P_b = 10^{-5}$, and how does that compare with QPSK?

::: solution
1. **Error formula with k = 4.**
   $$\begin{aligned} P_b &\approx \frac{4(1 - 1/4)}{4}Q\left(\sqrt{\frac{12}{15}\cdot\frac{E_b}{N_0}}\right) \\ &= 0.75\,Q(\sqrt{0.8E_b/N_0}) \end{aligned}$$
2. **Solve for 10⁻⁵.** It reaches 10⁻⁵ at $E_b/N_0$ ≈ 13.4 dB.
3. **Compare QPSK.** QPSK needs 9.6 dB, so 16-QAM carries twice the bits per symbol for
   $$13.4 - 9.6 = 3.8\ \text{dB}$$
   more energy per bit.

**Answer:** 16-QAM needs about 13.4 dB, 3.8 dB more than QPSK's 9.6 dB, for twice the bits per symbol.
:::
:::

::: example
## A 6 MHz cable channel with rolloff 0.12: compare 64- and 256-QAM.

::: solution
1. **Symbol rate.** It's the same for both:
   $$\begin{aligned} R_s &= \frac{6}{1.12}\ \text{Mbaud} \\ &= 5.36\ \text{Mbaud} \end{aligned}$$
2. **64-QAM.** It needs 17.8 dB Eb/N0 for 10⁻⁵:
   $$\begin{aligned} R_b &= 6R_s \\ &= 32.1\ \text{Mb/s} \end{aligned}$$
3. **256-QAM.** It needs 22.5 dB:
   $$\begin{aligned} R_b &= 8R_s \\ &= 42.9\ \text{Mb/s} \end{aligned}$$
4. **The SNR cost.** The extra 4.7 dB per bit, plus 1.25 dB because there are more bits, means about 6 dB more SNR for a third more throughput:
   $$4.7 + 1.25 \approx 6\ \text{dB}$$

**Answer:** both run at 5.36 Mbaud; 64-QAM carries 32.1 Mb/s at 17.8 dB, and 256-QAM 42.9 Mb/s at 22.5 dB, about 6 dB more SNR for a third more throughput.
:::
:::

::: example
## Compare 64-QAM and 256-QAM at Eb/N0 = 20 dB, and their peak-to-average power ratios.

::: solution
1. **256-QAM.**
   $$\begin{aligned} P_b &\approx \frac{4(1 - 1/16)}{8}Q\left(\sqrt{\frac{24}{255} \times 100}\right) \\ &= 0.469\,Q(3.07) \\ &= 5.1 \times 10^{-4} \end{aligned}$$
2. **64-QAM.**
   $$\begin{aligned} P_b &\approx 0.583\,Q(5.35) \\ &= 2.6 \times 10^{-8} \end{aligned}$$
3. **Peak-to-average ratios.** The constellations' ratios, $3(\sqrt M - 1)^2/(M - 1)$, are 3.7 dB for 64-QAM and 4.2 dB for 256-QAM: the denser constellation also asks more of the power amplifier.

**Answer:** at 20 dB, 256-QAM gives $P_b \approx 5.1 \times 10^{-4}$ and 64-QAM 2.6 × 10⁻⁸; their peak-to-average ratios are 4.2 dB and 3.7 dB.
:::
:::

::: check
given: M = 4 | 16 | 64 | 256; E = 10 | 14 | 18
answer: 4*(1 - 1/sqrt(M))*Q(sqrt(3*log(M)/log(2)/(M - 1)*10^(E/10)))/(log(M)/log(2))
tolerance: 1%

## Gray-coded {M}-QAM runs at Eb/N0 = {E} dB. What's its approximate bit error probability?

::: right
Right. $\frac{4(1 - 1/\sqrt{M})}{\log_2M}Q\left(\sqrt{\frac{3\log_2M}{M - 1}\frac{E_b}{N_0}}\right)$ = {answer}.
:::

::: misses
- [4*(1 - 1/sqrt(M))*Q(sqrt(3*log(M)/log(2)/(M - 1)*10^(E/10)))] That's the symbol error rate; divide by bits per symbol for Gray coding.
- [any] Not yet. Nearest-neighbor approximation, then divide by log₂M.
:::
:::

::: check
given: M = 4 | 8 | 16; E = 8 | 12 | 16
answer: 2*(1 - 1/M)*Q(sqrt(6*log(M)/log(2)/(M^2 - 1)*10^(E/10)))
tolerance: 1%

## {M}-PAM runs at Eb/N0 = {E} dB. What's its symbol error probability?

::: right
Right. $2(1 - 1/M)Q\left(\sqrt{\frac{6\log_2M}{M^2 - 1}\frac{E_b}{N_0}}\right)$ = {answer}.
:::

::: misses
- [any] Not yet. Inner levels have two neighbors, outer ones one.
:::
:::

::: check
given: M = 16 | 64 | 256 | 1024; d = 1 | 0.5
answer: 2*(M - 1)*d^2/3
tolerance: 0.5%

## A square {M}-QAM constellation has its points spaced 2d apart with d = {d}. What's its average symbol energy?

::: right
Right. $2(M - 1)d^2/3$ = {answer}.
:::

::: misses
- [(M - 1)*d^2/3] That's one axis's PAM energy; QAM has two.
- [any] Not yet. Two $\sqrt{M}$-PAM signals, each $(M - 1)d^2/3$.
:::
:::

::: check
given: B = 6 | 8 | 20; b = 0.12 | 0.25; M = 64 | 256 | 1024
answer: B/(1 + b)*log(M)/log(2)
unit: Mb/s
tolerance: 0.5%

## A {B} MHz passband channel carries {M}-QAM with raised-cosine rolloff {b}. What bit rate does it support?

::: right
Right. $\frac{B}{1 + \beta}\log_2M$ = {answer} Mb/s.
:::

::: misses
- [2*B/(1 + b)*log(M)/log(2)] At passband the symbol rate is $B/(1 + \beta)$, not twice that.
- [any] Not yet. Symbol rate times bits per symbol.
:::
:::

::: check
given: a = 16 | 64; c = 64 | 256 | 1024
answer: 10*log((3*log(a)/log(2)/(a - 1))/(3*log(c)/log(2)/(c - 1)))
unit: dB
tolerance: 0.05

## Roughly how much more Eb/N0 does {c}-QAM need than {a}-QAM for the same error rate (comparing the Q-function arguments)?

::: right
Right. The ratio of $\frac{3\log_2M}{M - 1}$ terms: {answer} dB.
:::

::: misses
- [any] Not yet. Compare $\frac{\log_2M}{M - 1}$ for the two.
:::
:::

::: check
given: M = 4 | 16 | 64 | 256; b = 0 | 0.2 | 0.35
answer: log(M)/log(2)/(1 + b)
tolerance: 0.5%

## What spectral efficiency, in bits/s/Hz of passband, does {M}-QAM with rolloff {b} give?

::: right
Right. $\log_2M/(1 + \beta)$ = {answer}.
:::

::: misses
- [M/(1 + b)] Bits per symbol is log₂M.
- [any] Not yet. Bits per symbol over $(1 + \beta)$.
:::
:::

::: check
kind: parts
given: M = 16 | 64 | 256 | 1024; d = 0.5 | 1

## A square {M}-QAM constellation has points 2d apart with d = {d}.

::: part
answer: 2*(M - 1)*d^2/3
tolerance: 0.5%

### What is its average symbol energy?

::: misses
- [any] $2(M - 1)d^2/3$.
:::
:::

::: part
answer: 10*log(3*(sqrt(M) - 1)^2/(M - 1))
unit: dB
tolerance: 0.5%

### What is its peak-to-average power ratio?

::: misses
- [any] The corner point's energy $2(\sqrt M - 1)^2d^2$ over the average.
:::
:::
:::

::: check
kind: derivation
vars: M = 4..4096, d = 0.1..10

## A square M-QAM constellation has points 2d apart.

::: step
answer: 2*(M - 1)*d^2/3

### What is its average energy?
:::

::: step
answer: 2*(sqrt(M) - 1)^2*d^2

### What is its corner point's energy?
:::

::: step
answer: 3*(sqrt(M) - 1)^2/(M - 1)

### What is the peak-to-average ratio?
:::

::: right
Right. It approaches 3 (4.8 dB) for very large constellations.
:::
:::

::: explain
## Why does each step up the QAM ladder cost more energy per bit, even though the points are packed in two dimensions?

::: model
For a fixed average energy, adding points to a constellation forces them closer together, and errors depend on the distance between neighbors relative to the noise. A square M-QAM grid's average energy grows roughly in proportion to M times the squared spacing, while the bits it carries grow only as log₂M. To keep the spacing, and so the error rate, the same while quadrupling M, the energy per symbol has to grow about fourfold while the bits per symbol grow by only two, so the energy per bit rises. That's the fundamental exchange: bandwidth efficiency rises logarithmically with M while the required Eb/N0 rises steadily, which is why links adapt their constellation to the SNR they actually have.
:::
:::

::: practice

::: check
given: M = 16 | 64; E = 12 | 20
answer: 4*(1 - 1/sqrt(M))*Q(sqrt(3*log(M)/log(2)/(M - 1)*10^(E/10)))/(log(M)/log(2))
tolerance: 1%

## {M}-QAM bit error probability at {E} dB?

::: misses
- [any] The QAM formula over log₂M.
:::
:::

::: check
given: M = 64 | 4096; d = 1 | 2
answer: 2*(M - 1)*d^2/3
tolerance: 0.5%

## Average energy of {M}-QAM, half-spacing d = {d}?

::: misses
- [any] $2(M - 1)d^2/3$.
:::
:::

::: check
given: B = 10 | 40; b = 0.15 | 0.3; M = 16 | 256
answer: B/(1 + b)*log(M)/log(2)
unit: Mb/s
tolerance: 0.5%

## Bit rate: {B} MHz, {M}-QAM, rolloff {b}?

::: misses
- [any] $\frac{B}{1 + \beta}\log_2M$.
:::
:::
:::
