---
title: Capacity of fading channels
heading: Capacity of parallel Gaussian channels and water-filling, ergodic capacity when codewords span many fades, outage probability and outage capacity when they don't, and how diversity changes the outage slope
eyebrow: S8 · Lesson 45 · Capacity of fading channels
xp: 50
---

::: hook
Lesson 31's Shannon capacity assumed a channel that never changes. A fading channel's capacity depends on a question the AWGN channel never raises: can a codeword wait long enough to see many fades? If it can, the channel has a capacity a little below the AWGN one. If it can't, as for a voice call on a slowly fading channel, there is no rate that is always reliable, and the right question becomes how often a given rate fails. Tse and Viswanath build both answers from the same formula.
:::

::: play
- A slowly fading Rayleigh channel carries a fixed rate R. The link fails (an outage) when the fade is so deep that $\log_2(1 + |h|^2\,\text{SNR}) < R$.
- The curves are the outage probability against the average SNR for a single antenna and for receivers combining 2 and 4 independently fading antennas (maximal-ratio combining).
- With one antenna the outage falls only tenfold per 10 dB. Each extra branch steepens the slope by another factor: diversity order L means a fall of $10^L$ per 10 dB. Raising the rate shifts every curve right.
:::

```sim plot
view: graph
x: S = 0..30 dB
y: P = 0.000001..1 log
slider: R = 0.5..6 = 2
plot: 1 - exp(-(2^R - 1)/10^(S/10)) | samples: 400 | label: 1 antenna
plot: 1 - exp(-(2^R - 1)/10^(S/10))*(1 + (2^R - 1)/10^(S/10)) | samples: 400 | color: ch3 | label: 2 antennas
plot: 1 - exp(-(2^R - 1)/10^(S/10))*(1 + (2^R - 1)/10^(S/10) + ((2^R - 1)/10^(S/10))^2/2 + ((2^R - 1)/10^(S/10))^3/6) | samples: 400 | color: ch4 | label: 4 antennas
readout: outage with 1 antenna at 20 dB = 1 - exp(-(2^R - 1)/100) | digits: 3
```

::: predict
## A single-antenna link on a slowly fading Rayleigh channel runs at 20 dB average SNR. What rate can it sustain with only 1% outage?

- [ ] About 6.7 bit/s/Hz, the AWGN capacity
- [ ] About 5.9 bit/s/Hz, the ergodic capacity
- [x] About 1 bit/s/Hz
- [ ] Zero; Rayleigh channels have no capacity

::: reveal
The 1% outage capacity is $\log_2(1 + \text{SNR}\,F^{-1}(0.01))$, where $F^{-1}(0.01) = -\ln 0.99$ = 0.01 is the gain exceeded 99% of the time. That's $\log_2(1 + 100 \times 0.01005)$ = 1.0 bit/s/Hz, a sixth of the AWGN value. Deep fades, not average power, limit a slowly fading link, which is why diversity matters so much.
:::
:::

::: nameit
## Parallel channels and water-filling

N independent Gaussian channels with gains $g_n$ (signal-to-noise per unit power) and a total power P have capacity

$$C = \sum_n \log_2(1 + g_nP_n), \qquad P_n = \left(\mu - \frac{1}{g_n}\right)^+$$

with the **water level** μ set by $\sum P_n = P$. Picture pouring water over a floor of heights $1/g_n$: strong channels get more power, and channels whose floor is above the water get none. OFDM subcarriers over a frequency-selective channel (lesson 26) are exactly such parallel channels, which is why adaptive modems load bits and power per subcarrier.

## Fast fading: ergodic capacity

If a codeword spans many coherence times, it sees the whole distribution of fades, and the capacity with the receiver knowing the channel is

$$C = E\left[\log_2(1 + |h|^2\,\text{SNR})\right]$$

By Jensen's inequality it's below the AWGN capacity at the same average SNR. For Rayleigh fading at high SNR the loss is $\gamma_E/\ln 2$ = 0.83 bit/s/Hz ($\gamma_E$ = 0.5772, Euler's constant): only about 2.5 dB. If the transmitter also knows the channel, it can water-fill over time.

## Slow fading: outage

If the channel stays fixed for the whole codeword, no fixed rate is reliable for every fade. Tse and Viswanath define the **outage probability** at rate R,

$$p_\text{out}(R) = P\left[\log_2(1 + |h|^2\,\text{SNR}) < R\right] = 1 - e^{-(2^R - 1)/\text{SNR}}$$

for Rayleigh fading ($|h|^2$ exponential with mean 1). At high SNR, $p_\text{out} \approx (2^R - 1)/\text{SNR}$: it falls only as 1/SNR. The **outage capacity** $C_\epsilon$ is the largest rate with $p_\text{out} \le \epsilon$: for Rayleigh, $\log_2\left(1 - \text{SNR}\ln(1 - \epsilon)\right)$.

## Diversity

With L independently fading branches combined by maximal-ratio combining (lesson 44), $\|h\|^2$ is a sum of L exponentials, and

$$p_\text{out} = 1 - e^{-x}\sum_{k=0}^{L-1}\frac{x^k}{k!} \approx \frac{x^L}{L!}, \qquad x = \frac{2^R - 1}{\text{SNR}}$$

so the outage falls as $1/\text{SNR}^L$: diversity order L. Receive diversity also adds L times the power (array gain); transmit diversity spreads the same power over L paths, giving the diversity but not the power gain.
:::

::: example
## Three subcarriers have gains of 10, 5 and 1 per unit power. Water-fill a total power of 1 and compare with equal power.

::: solution
1. **Try all three.**
   $$\begin{aligned} \mu &= \frac{1 + 1/10 + 1/5 + 1/1}{3} \\ &= 0.767 \end{aligned}$$
   That's below the weakest channel's floor of 1, so it gets nothing.
2. **Two subcarriers.**
   $$\begin{aligned} \mu &= \frac{1 + 0.1 + 0.2}{2} \\ &= 0.65 \end{aligned}$$
   giving powers 0.55 and 0.45.
3. **Capacity.**
   $$\begin{aligned} C &= \log_2(1 + 5.5) \\ &\quad + \log_2(1 + 2.25) \\ &= 2.70 + 1.70 \\ &= 4.40\ \text{bits per use} \end{aligned}$$
4. **Equal power.** A third each gives 2.12, 1.42 and 0.42 bits:
   $$\begin{aligned} C &= \log_2(1 + 10/3) \\ &\quad + \log_2(1 + 5/3) \\ &\quad + \log_2(1 + 1/3) \\ &= 3.95\ \text{bits} \end{aligned}$$
5. **The gain.** Water-filling gains 0.45 bits, mostly by not wasting power on the weak subcarrier.

**Answer:** water-filling puts 0.55 and 0.45 on the two strong subcarriers and nothing on the weak one, for 4.40 bits per use against 3.95 with equal power.
:::
:::

::: example
## At 20 dB average SNR and 2 bit/s/Hz, find the outage probability with one antenna and with two, and the ergodic capacity.

::: solution
1. **Outage threshold.**
   $$\begin{aligned} x &= \frac{2^2 - 1}{100} \\ &= 0.03 \end{aligned}$$
2. **One antenna.**
   $$\begin{aligned} P_\text{out} &= 1 - e^{-0.03} \\ &= 0.0296 \end{aligned}$$
   about 3%.
3. **Two antennas with MRC.**
   $$\begin{aligned} P_\text{out} &= 1 - e^{-0.03}(1.03) \\ &= 4.4 \times 10^{-4} \end{aligned}$$
   close to $x^2/2$ = 4.5 × 10⁻⁴, and nearly seventy times better.
4. **Ergodic capacity.** Averaging $\log_2(1 + 100|h|^2)$ over the exponential distribution gives 5.88 bit/s/Hz, against 6.66 for AWGN.
5. **Fast against slow fading.** A fast-fading channel loses less than a bit per second per hertz; a slow-fading one at 1% outage gives up five.

**Answer:** the outage probability is 0.0296 with one antenna and 4.4 × 10⁻⁴ with two, and the ergodic capacity is 5.88 bit/s/Hz.
:::
:::

::: example
## Two subchannels have gains of 4 and 1 per unit power, with total power 1. Water-fill, and compare with equal power.

::: solution
1. **Water level.** If both are active,
   $$\begin{aligned} (\mu - \frac14) + (\mu - 1) &= 1 \\ \mu &= 1.125 \end{aligned}$$
   giving powers 0.875 and 0.125, both positive.
2. **Capacity.**
   $$\begin{aligned} C &= \log_2(1 + 3.5) \\ &\quad + \log_2(1 + 0.125) \\ &= 2.17 + 0.17 \\ &= 2.34\ \text{bit/s/Hz} \end{aligned}$$
3. **Equal power.**
   $$\begin{aligned} C &= \log_2 3 + \log_2 1.5 \\ &= 2.17\ \text{bit/s/Hz} \end{aligned}$$
4. **The gain.** Water-filling gains 0.17 bit/s/Hz here; the gain is largest at low SNR, where weak subchannels are best switched off.

**Answer:** powers of 0.875 and 0.125 give 2.34 bit/s/Hz, against 2.17 with equal power.
:::
:::

::: check
given: R = 1 | 2 | 3; S = 8 | 12 | 16
answer: 1 - exp(-(2^R - 1)/10^(S/10))
tolerance: 0.5%

## A Rayleigh-fading link with one antenna runs at {R} bit/s/Hz with {S} dB average SNR. What's its outage probability?

::: right
Right. $1 - e^{-(2^R - 1)/\text{SNR}}$ = {answer}.
:::

::: misses
- [(2^R - 1)/10^(S/10)] That's the high-SNR approximation; use the exact form.
- [1 - exp(-(2^R)/10^(S/10))] The threshold is $2^R - 1$: the SNR needed for rate R.
- [any] Not yet. Outage when $|h|^2 < (2^R - 1)/\text{SNR}$, with $|h|^2$ exponential.
:::
:::

::: check
given: e = 0.001 | 0.01 | 0.1; S = 10 | 20 | 30
answer: log(1 - 10^(S/10)*ln(1 - e))/log(2)
tolerance: 0.5%

## What's the outage capacity at outage probability {e} of a single-antenna Rayleigh channel at {S} dB?

::: right
Right. $\log_2(1 - \text{SNR}\ln(1 - \epsilon))$ = {answer} bit/s/Hz.
:::

::: misses
- [log(1 + 10^(S/10))/log(2)] That's the AWGN capacity; the channel must survive deep fades.
- [any] Not yet. Find the fade depth exceeded with probability 1 − ε, then the rate it supports.
:::
:::

::: check
given: R = 1 | 2 | 3; S = 15 | 20 | 25; L = 2 | 3 | 4
answer: ((2^R - 1)/10^(S/10))^L/L!
tolerance: 3%

## With L = {L} diversity branches, rate {R} bit/s/Hz and {S} dB average SNR, what's the high-SNR approximation to the outage probability?

::: right
Right. $x^L/L!$ = {answer}.
:::

::: misses
- [((2^R - 1)/10^(S/10))^L] Divide by L!.
- [(2^R - 1)/10^(S/10)] That's a single branch; diversity raises it to the Lth power.
- [any] Not yet. $p_\text{out} \approx x^L/L!$ with $x = (2^R - 1)/\text{SNR}$.
:::
:::

::: check
given: a = 10 | 20; b = 2 | 3; P = 0.6 | 1
answer: log(1 + a*((P + 1/a + 1/b)/2 - 1/a))/log(2) + log(1 + b*((P + 1/a + 1/b)/2 - 1/b))/log(2)
tolerance: 0.5%

## Two parallel channels have gains {a} and {b} per unit power, with total power {P}, and both get power under water-filling. What's the total capacity, in bits per use?

::: right
Right. μ = (P + 1/a + 1/b)/2, powers μ − 1/g, and the capacities add: {answer} bits.
:::

::: misses
- [log(1 + a*P/2)/log(2) + log(1 + b*P/2)/log(2)] That's equal power. Water-filling gives the stronger channel more.
- [any] Not yet. Find the water level, the powers, then add the capacities.
:::
:::

::: check
given: S = 20 | 30 | 40
answer: (S/10)/log(2) - 0.5772/ln(2)
tolerance: 0.5%

## At high average SNR ({S} dB), approximately what's the ergodic capacity of a Rayleigh channel, in bit/s/Hz?

::: right
Right. $\log_2\text{SNR} - \gamma_E/\ln 2$ = {answer}: about 0.83 below $\log_2\text{SNR}$.
:::

::: misses
- [(S/10)/log(2)] Subtract the Jensen loss, $\gamma_E/\ln 2$ = 0.83.
- [any] Not yet. $E[\log_2|h|^2] = -\gamma_E/\ln 2$ for Rayleigh fading.
:::
:::

::: check
kind: parts
given: S = 10 | 20 | 30

## A single-antenna Rayleigh channel has {S} dB average SNR.

::: part
answer: log(10^(S/10))/log(2) - 0.5772/ln(2)
unit: bits
tolerance: 1%

### Approximately what is its ergodic capacity per hertz?

::: misses
- [any] $\log_2\text{SNR} - \gamma_E/\ln2$.
:::
:::

::: part
answer: log(1 + 10^(S/10))/log(2) - (log(10^(S/10))/log(2) - 0.5772/ln(2))
unit: bits
tolerance: 2%

### How far below the AWGN capacity at the same average SNR is that?

::: misses
- [any] $\log_2(1 + \text{SNR})$ minus the ergodic figure.
:::
:::
:::

::: check
kind: derivation
vars: R = 0.1..8, S = 1..10000, e = 0.001..0.5

## A single-antenna Rayleigh link has average SNR S (linear).

::: step
answer: 1 - exp(-(2^R - 1)/S)

### What is its outage probability at rate R?
:::

::: step
answer: log(1 - S*ln(1 - e))/log(2)

### What rate has outage probability e?
:::

::: right
Right. For small e the outage capacity is about $\log_2(1 + e\,\text{SNR})$: a 1% outage target costs 20 dB.
:::
:::

::: explain
## Why does a slowly fading channel have no capacity in the usual sense, while a fast-fading one does?

::: model
Shannon's capacity is the highest rate at which the error probability can be driven to zero by longer codes. On a fast-fading channel a long codeword spans many independent fades, so its symbols see the average behavior of the channel, and the law of large numbers makes the mutual information per symbol settle at $E[\log_2(1 + |h|^2\text{SNR})]$: there's a well-defined capacity. On a slowly fading channel the whole codeword sees one gain. Making the code longer doesn't average anything; whenever the gain happens to be too small to support the chosen rate, decoding fails however good the code. Since a Rayleigh gain can be arbitrarily small, every positive rate fails with some probability, so the meaningful measures are the outage probability at a rate and the rate at a target outage. Diversity, from antennas, frequencies or time, makes deep fades on all branches at once rare, which is what reduces outage.
:::
:::

::: practice

::: check
given: R = 0.5..6; S = 0..40
answer: 1 - exp(-(2^R - 1)/10^(S/10))
tolerance: 0.5%

## Outage: {R} bit/s/Hz at {S} dB, one antenna?

::: misses
- [any] $1 - e^{-(2^R - 1)/\text{SNR}}$.
:::
:::

::: check
given: e = 0.0001..0.2; S = 0..40
answer: log(1 - 10^(S/10)*ln(1 - e))/log(2)
tolerance: 0.5%

## Outage capacity at ε = {e}, {S} dB?

::: misses
- [any] $\log_2(1 - \text{SNR}\ln(1 - \epsilon))$.
:::
:::
:::
