---
title: Fading channels and diversity
heading: Multipath and Rayleigh fading, the error rate of a fading link, Doppler spread and coherence time, delay spread and coherence bandwidth, and diversity with maximal-ratio combining
eyebrow: S8 · Lesson 44 · Fading channels and diversity
xp: 50
---

::: hook
A phone in a city receives its signal by dozens of paths, reflected off buildings and cars, and as it moves those paths add and cancel, making the received power swing by 30 dB or more over a few centimeters. On such a channel, error rates no longer fall as a Gaussian tail but only inversely with the average SNR: reaching 10⁻⁵ needs about 44 dB instead of 9.6. The cure is diversity, giving the receiver several independently fading copies of the signal, from two antennas, two frequencies or two moments, because it's unlikely that all of them fade at once.
:::

::: play
- Bit error probability against average Eb/N0 for BPSK on an unfaded (AWGN) channel and on a Rayleigh fading channel with 1, 2 and 4 independent branches combined by maximal-ratio combining.
- One Rayleigh branch needs 44 dB for 10⁻⁵, 34 dB more than AWGN. The curve falls only one decade per 10 dB.
- Two branches bring it to 21 dB and four to 10 dB: each order of diversity steepens the curve by another decade per 10 dB.
:::
:::

```sim plot
view: graph
x: E = 0..45 dB
y: P = 1e-8..0.5 log
plot: Q(sqrt(2*10^(E/10))) | samples: 400 | dashed | color: ch3 | label: AWGN
plot: 0.5*(1 - sqrt(10^(E/10)/(1 + 10^(E/10)))) | samples: 400 | label: Rayleigh, 1 branch
plot: ((1 - sqrt(10^(E/10)/(1 + 10^(E/10))))/2)^2*(2 + sqrt(10^(E/10)/(1 + 10^(E/10)))) | samples: 400 | color: ch2 | label: Rayleigh, 2 branches (MRC)
plot: ((1 - sqrt(10^(E/10)/(1 + 10^(E/10))))/2)^4*(1 + 4*(1 + sqrt(10^(E/10)/(1 + 10^(E/10))))/2 + 10*((1 + sqrt(10^(E/10)/(1 + 10^(E/10))))/2)^2 + 20*((1 + sqrt(10^(E/10)/(1 + 10^(E/10))))/2)^3) | samples: 400 | dashed | label: Rayleigh, 4 branches (MRC)
```

::: predict
## A BPSK link on a Rayleigh fading channel runs at 20 dB average SNR. What's its bit error rate, roughly?

- [ ] 10⁻⁴⁵, as on an unfaded channel
- [ ] 10⁻⁵
- [x] About 2.5 × 10⁻³
- [ ] 0.5

::: reveal
$\frac{1}{2}\left(1 - \sqrt{\frac{100}{101}}\right)$ = 2.5 × 10⁻³, close to $1/(4\bar\gamma)$. Almost all the errors happen during the rare deep fades, when the instantaneous SNR drops far below average. Adding a second independently fading antenna brings it to 1.8 × 10⁻⁵.
:::
:::

::: nameit
## Rayleigh fading

Many scattered paths of comparable strength add to a complex Gaussian gain, whose magnitude is Rayleigh distributed and whose power is exponential. For BPSK with average SNR $\bar\gamma$ (per bit):

$$P_b = \frac{1}{2}\left(1 - \sqrt{\frac{\bar\gamma}{1 + \bar\gamma}}\right) \approx \frac{1}{4\bar\gamma}$$

Inverse, not exponential, in $\bar\gamma$. A strong direct path (Rician fading) softens this.

## Time and frequency selectivity

- **Doppler**: motion at speed v shifts each path by up to $f_d = vf_c/c$. The channel changes over a **coherence time** of about $0.423/f_d$.
- **Delay spread** $\sigma_\tau$: paths arriving at different times make the response vary with frequency; the **coherence bandwidth** is roughly $B_c \approx 1/(5\sigma_\tau)$. Signals wider than $B_c$ see frequency-selective fading (handled by equalizers or OFDM); narrower ones see flat fading.

## Diversity

L copies that fade independently, combined by **maximal-ratio combining** (each weighted by its gain's conjugate), give, with $\mu = \sqrt{\bar\gamma/(1 + \bar\gamma)}$,

$$P_b = \left(\frac{1 - \mu}{2}\right)^L\sum_{k=0}^{L-1}\binom{L - 1 + k}{k}\left(\frac{1 + \mu}{2}\right)^k \approx \binom{2L - 1}{L}\left(\frac{1}{4\bar\gamma}\right)^L$$

The error rate falls as $\bar\gamma^{-L}$: the **diversity order** L. Sources of diversity: antennas spaced half a wavelength or more apart, frequencies more than $B_c$ apart, time slots more than the coherence time apart (with interleaving and coding), and multipath itself (RAKE receivers, lesson 47).
:::

::: example
## A phone moves at 100 km/h on a 2 GHz carrier. What's its Doppler shift and how quickly does the channel change?

::: solution
1. **Speed.**
   $$\begin{aligned} v &= \frac{100}{3.6}\ \text{m/s} \\ &= 27.8\ \text{m/s} \end{aligned}$$
2. **Doppler shift.**
   $$\begin{aligned} f_d &= \frac{27.8 \times 2 \times 10^9}{3 \times 10^8}\ \text{Hz} \\ &= 185\ \text{Hz} \end{aligned}$$
3. **Coherence time.**
   $$\begin{aligned} T_c &\approx \frac{0.423}{185}\ \text{s} \\ &= 2.3\ \text{ms} \end{aligned}$$
4. **What it means.** Pilot symbols must come more often than that, and an interleaver must spread coded bits over several such intervals to gain time diversity.

**Answer:** the Doppler shift is 185 Hz, and the channel changes in about 2.3 ms.
:::
:::

::: example
## At 20 dB average SNR, compare one, two and four Rayleigh branches with MRC.

::: solution
1. **μ at 20 dB.**
   $$\begin{aligned} \mu &= \sqrt{100/101} \\ &= 0.99504 \end{aligned}$$
2. **One branch.**
   $$\begin{aligned} P_b &= \frac{1 - \mu}{2} \\ &= 2.5 \times 10^{-3} \end{aligned}$$
3. **Two branches.**
   $$\begin{aligned} P_b &= (0.00248)^2(2 + 0.995) \\ &= 1.8 \times 10^{-5} \end{aligned}$$
4. **Four branches.**
   $$P_b = 1.3 \times 10^{-9}$$
5. **SNR for 10⁻⁵.** The requirements are 44, 21.3 and 10.0 dB.

**Answer:** 2.5 × 10⁻³ with one branch, 1.8 × 10⁻⁵ with two and 1.3 × 10⁻⁹ with four.
:::
:::

::: example
## What average SNR does Rayleigh-fading BPSK need for a 10⁻³ error rate, alone and with two-branch MRC?

::: solution
1. **One branch.** Setting
   $$\frac12(1 - \mu) = 10^{-3}$$
   gives
   $$\begin{aligned} \bar\gamma &= 249 \\ &= 24.0\ \text{dB} \end{aligned}$$
   The approximation $1/4\bar\gamma$ gives 250.
2. **Unfaded.** An unfaded channel needs only 6.8 dB.
3. **Two branches.** Setting
   $$\binom{3}{2}\left(\frac{1}{4\bar\gamma}\right)^2 = 10^{-3}$$
   gives
   $$\begin{aligned} \bar\gamma &= \sqrt{187.5} \\ &= 13.7 \\ &= 11.4\ \text{dB} \end{aligned}$$
   per branch.
4. **What diversity buys.** Diversity recovers most of fading's 17 dB penalty.

**Answer:** 24.0 dB with one branch and 11.4 dB per branch with two, against 6.8 dB without fading.
:::
:::

::: check
given: E = 10 | 20 | 30 | 40
answer: 0.5*(1 - sqrt(10^(E/10)/(1 + 10^(E/10))))
tolerance: 1%

## BPSK on a Rayleigh channel runs at {E} dB average Eb/N0. What's its bit error probability?

::: right
Right. $\frac{1}{2}(1 - \sqrt{\bar\gamma/(1 + \bar\gamma)})$ = {answer}.
:::

::: misses
- [Q(sqrt(2*10^(E/10)))] That's the unfaded result; fading is far worse.
- [any] Not yet. Average the AWGN error rate over the exponential SNR distribution.
:::
:::

::: check
given: E = 30 | 40 | 50
answer: 1/(4*10^(E/10))
tolerance: 1%

## Using the high-SNR approximation, what's Rayleigh BPSK's error rate at {E} dB?

::: right
Right. $1/(4\bar\gamma)$ = {answer}.
:::

::: misses
- [1/(2*10^(E/10))] The approximation is $1/(4\bar\gamma)$.
- [any] Not yet. Expand $\frac{1}{2}(1 - \sqrt{\bar\gamma/(1 + \bar\gamma)})$ for large $\bar\gamma$.
:::
:::

::: check
given: v = 3 | 50 | 120 | 300; f = 0.9 | 2 | 5.8
answer: v/3.6*f*1e9/299792458
unit: Hz
tolerance: 0.5%

## A receiver moves at {v} km/h on a {f} GHz carrier. What's the maximum Doppler shift?

::: right
Right. $vf_c/c$ = {answer} Hz.
:::

::: misses
- [v*f*1e9/299792458] Convert km/h to m/s.
- [any] Not yet. $f_d = v/\lambda$.
:::
:::

::: check
given: d = 10 | 100 | 500
answer: 0.423/d*1000
unit: ms
tolerance: 0.5%

## A channel's maximum Doppler shift is {d} Hz. Roughly what's its coherence time?

::: right
Right. $0.423/f_d$ = {answer} ms.
:::

::: misses
- [1/d*1000] The common estimate is 0.423/f_d.
- [any] Not yet. $T_c \approx 0.423/f_d$.
:::
:::

::: check
given: E = 10 | 15 | 20 | 25
answer: ((1 - sqrt(10^(E/10)/(1 + 10^(E/10))))/2)^2*(2 + sqrt(10^(E/10)/(1 + 10^(E/10))))
tolerance: 1%

## Two independently fading Rayleigh branches are combined by MRC at {E} dB average Eb/N0 per branch. What's the BPSK error rate?

::: right
Right. $\left(\frac{1 - \mu}{2}\right)^2(2 + \mu)$ = {answer}.
:::

::: misses
- [(0.5*(1 - sqrt(10^(E/10)/(1 + 10^(E/10)))))^2] Squaring the single-branch error rate ignores the combining; use the MRC formula.
- [any] Not yet. L = 2 in the MRC formula.
:::
:::

::: check
given: s = 0.1 | 1 | 5
answer: 1/(5*s)
unit: MHz
tolerance: 0.5%

## A channel's rms delay spread is {s} µs. Roughly what's its coherence bandwidth?

::: right
Right. $1/(5\sigma_\tau)$ = {answer} MHz.
:::

::: misses
- [1/s] The usual estimate for 50% correlation is $1/(5\sigma_\tau)$.
- [any] Not yet. $B_c \approx 1/(5\sigma_\tau)$.
:::
:::

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

## Rayleigh-fading BPSK runs at {E} dB average Eb/N0.

::: part
answer: 0.5*(1 - sqrt(10^(E/10)/(1 + 10^(E/10))))
tolerance: 1%

### What is its exact bit error probability with one branch?

::: misses
- [Q(sqrt(2*10^(E/10)))] That's an unfaded channel.
- [any] $\frac12(1 - \sqrt{\bar\gamma/(1 + \bar\gamma)})$.
:::
:::

::: part
answer: 3*(1/(4*10^(E/10)))^2
tolerance: 1%

### What does the high-SNR approximation give with two-branch MRC?

::: misses
- [any] $\binom{3}{2}(1/4\bar\gamma)^2$.
:::
:::
:::

::: check
kind: derivation
vars: g = 1..10000

## Rayleigh BPSK runs at average SNR g (linear).

::: step
answer: sqrt(g/(1 + g))

### What is μ?
:::

::: step
answer: 0.5*(1 - sqrt(g/(1 + g)))

### What is the exact error probability?
:::

::: step
answer: 1/(4*g)

### What does the high-SNR approximation give?
:::

::: right
Right. The error rate falls only as $1/\bar\gamma$: ten times the power for ten times fewer errors.
:::
:::

::: explain
## Why does fading turn an exponential fall in error rate into a merely inverse one, and how does diversity restore it?

::: model
On a steady channel, the error probability falls exponentially as the SNR rises, so a few extra decibels buy orders of magnitude. On a fading channel the instantaneous SNR wanders, and occasionally it drops very low; during those deep fades the error rate is near one half. The probability of a fade deep enough to cause errors falls only in proportion to one over the average SNR, so that's how the average error rate falls too. With L independently fading branches, an error requires all of them to be in a deep fade at once, whose probability falls as the Lth power of one over the SNR. Diversity doesn't remove the fades, it makes it unlikely that they coincide.
:::
:::

::: practice

::: check
given: E = 10 | 15 | 20 | 25 | 30 | 35
answer: 0.5*(1 - sqrt(10^(E/10)/(1 + 10^(E/10))))
tolerance: 1%

## Rayleigh BPSK at {E} dB?

::: misses
- [any] $\frac{1}{2}(1 - \sqrt{\bar\gamma/(1 + \bar\gamma)})$.
:::
:::

::: check
given: v = 60 | 250; f = 1.8 | 3.5
answer: v/3.6*f*1e9/299792458
unit: Hz
tolerance: 0.5%

## Doppler: {v} km/h at {f} GHz?

::: misses
- [any] $vf_c/c$.
:::
:::

::: check
given: E = 8 | 10 | 12 | 15 | 18 | 22 | 25
answer: ((1 - sqrt(10^(E/10)/(1 + 10^(E/10))))/2)^2*(2 + sqrt(10^(E/10)/(1 + 10^(E/10))))
tolerance: 1%

## Two-branch MRC at {E} dB?

::: misses
- [any] $\left(\frac{1 - \mu}{2}\right)^2(2 + \mu)$.
:::
:::
:::
