---
title: SNR and BER
heading: The bit error rate as the probability that noise pushes a symbol across a decision boundary, the Q function, energy per bit over noise density as the fair way to compare schemes, error-rate curves for BPSK, QAM and FSK, and converting between Eb/N0 and SNR
eyebrow: D4 · Lesson 5 · SNR and BER
xp: 40
---

::: hook
A link's quality is measured by its **bit error rate**, the fraction of bits that arrive wrong. A voice call tolerates one error in a thousand; a file transfer, after error correction, wants fewer than one in a billion. Every modulation scheme has a curve relating error rate to signal strength, and those curves fall astonishingly steeply: a few decibels more signal can take a link from an error every hundred bits to one every million. Knowing where a scheme's curve sits tells you how much signal it needs.
:::

::: play
- Bit error rate against $E_b/N_0$ (energy per bit over noise power density) for BPSK and QPSK, 16-QAM, 64-QAM and noncoherent FSK, on a logarithmic scale.
- The curves plunge: each extra decibel near the bottom cuts the error rate several times over.
- The readouts give each scheme's error rate at the slider's $E_b/N_0$. Denser constellations sit to the right: they need more energy per bit.
:::

```sim plot
view: graph
x: E = 0..20
y: P = 1e-8..0.5 log
slider: g = 0..20 step 0.2 = 10
plot: Q(sqrt(2*10^(E/10))) | samples: 400 | label: BPSK and QPSK (E = Eb/N0 in dB)
plot: 0.75*Q(sqrt(0.8*10^(E/10))) | samples: 400 | color: ch3 | label: 16-QAM
plot: 7/12*Q(sqrt(18/63*10^(E/10))) | samples: 400 | color: ch4 | label: 64-QAM
plot: 0.5*exp(-10^(E/10)/2) | samples: 400 | dashed | color: ch5 | label: noncoherent FSK
marker: x = g | label: your Eb/N0
readout: BPSK error rate = Q(sqrt(2*10^(g/10))) | digits: 3
readout: 16-QAM error rate = 0.75*Q(sqrt(0.8*10^(g/10))) | digits: 3
```

::: predict
## A BPSK link runs at $E_b/N_0$ = 9.6 dB and carries a billion bits. About how many arrive wrong?

- [ ] About 1
- [ ] About 100
- [x] About 10,000
- [ ] About 10 million

::: reveal
$E_b/N_0$ = 9.6 dB is a ratio of 9.12, and BPSK's error rate is $Q(\sqrt{2 \times 9.12}) = Q(4.27) = 9.7 \times 10^{-6}$: about 9,700 errors in 10⁹ bits. One more decibel, 10.5 dB, brings it to one in a million.
:::
:::

::: nameit
## Errors from noise

The receiver's noise adds a Gaussian error to each received symbol. A symbol is misread when that error reaches halfway to a neighbor, distance d/2, which for noise of standard deviation σ happens with probability $Q(d/2\sigma)$, where

$$Q(x) = \frac{1}{\sqrt{2\pi}}\int_x^\infty e^{-u^2/2}\,du$$

is the tail of the normal distribution. Q(3) = 1.3 × 10⁻³, Q(4) = 3.2 × 10⁻⁵, Q(5) = 2.9 × 10⁻⁷.

## Energy per bit

To compare schemes fairly, error rates are plotted against $E_b/N_0$: the energy received per bit over the noise's power spectral density. Then

- BPSK and Gray-coded QPSK: $P_b = Q\left(\sqrt{2E_b/N_0}\right)$;
- Gray-coded 16-QAM: $P_b \approx \frac{3}{4}Q\left(\sqrt{\frac{4}{5}E_b/N_0}\right)$;
- noncoherent binary FSK: $P_b = \frac{1}{2}e^{-E_b/2N_0}$.

## SNR and Eb/N0

Signal power is energy per bit times bit rate, and noise power is $N_0$ times bandwidth, so

$$\frac{E_b}{N_0} = \text{SNR}\cdot\frac{B}{R_b}$$

or in decibels, $E_b/N_0 = \text{SNR}_\text{dB} + 10\log_{10}(B/R_b)$. A scheme that packs more bits into each hertz needs a higher SNR for the same $E_b/N_0$.
:::

::: example
## At $E_b/N_0$ = 10 dB, what error rates do BPSK, 16-QAM and noncoherent FSK give?

::: solution
1. **BPSK.**
   $$Q(\sqrt{20}) = 3.9 \times 10^{-6}$$
2. **16-QAM.**
   $$0.75\,Q(\sqrt8) = 1.8 \times 10^{-3}$$
3. **Noncoherent FSK.**
   $$0.5\,e^{-5} = 3.4 \times 10^{-3}$$
4. **For an error rate of 10⁻⁶.** BPSK needs 10.5 dB, 16-QAM 14.4 dB and 64-QAM 18.8 dB.

**Answer:** BPSK gives 3.9 × 10⁻⁶, 16-QAM 1.8 × 10⁻³ and noncoherent FSK 3.4 × 10⁻³.
:::
:::

::: example
## A Wi-Fi link sends 54 Mb/s in a 20 MHz channel with an SNR of 15 dB. What's its $E_b/N_0$?

::: solution
1. **Convert the SNR.**
   $$\begin{aligned} E_b/N_0 &= 15 + 10\log_{10}(20/54) \\ &= 15 - 4.3 \\ &= 10.7\ \text{dB} \end{aligned}$$
2. **What the difference means.** Carrying 2.7 bits per hertz costs 4.3 dB relative to the SNR.

**Answer:** $E_b/N_0$ is 10.7 dB.
:::
:::

::: example
## A link has 12 dB of SNR in 1 MHz and carries 2 Mb/s with BPSK-like detection per bit. What are its $E_b/N_0$ and bit error rate?

::: solution
1. **Energy per bit.**
   $$\begin{aligned} E_b/N_0 &= 12 + 10\log_{10}(1/2) \\ &= 9.0\ \text{dB} \end{aligned}$$
   As a ratio, the SNR's 15.85 halved is 7.92.
2. **Bit error rate.**
   $$\begin{aligned} P_b &= Q(\sqrt{2 \times 7.92}) \\ &= Q(3.98) \\ &= 3.4 \times 10^{-5} \end{aligned}$$
   about one error in 29,000 bits.

**Answer:** $E_b/N_0$ is 9.0 dB, and the bit error rate is 3.4 × 10⁻⁵.
:::
:::

::: check
given: E = 4 | 6 | 8 | 9
answer: Q(sqrt(2*10^(E/10)))
tolerance: 0.5%

## What's BPSK's bit error rate at $E_b/N_0$ = {E} dB?

::: right
Right. $Q(\sqrt{2E_b/N_0})$ = {answer}.
:::

::: misses
- [Q(sqrt(2*E))] Convert the decibels to a ratio first.
- [Q(sqrt(10^(E/10)))] BPSK's argument is $\sqrt{2E_b/N_0}$.
- [any] Not yet. Convert from dB, then the Q function.
:::
:::

::: check
given: S = 10 | 15 | 25; B = 20 | 40; R = 6 | 54 | 150
answer: S + 10*log(B/R)
unit: dB
tolerance: 0.5%

## A link carries {R} Mb/s in a {B} MHz channel at an SNR of {S} dB. What's its $E_b/N_0$?

::: right
Right. $\text{SNR} + 10\log_{10}(B/R_b)$ = {answer} dB.
:::

::: misses
- [S + 10*log(R/B)] It's bandwidth over bit rate.
- [any] Not yet. $E_b/N_0 = \text{SNR} \cdot B/R_b$.
:::
:::

::: check
given: E = 6 | 8 | 9 | 12
answer: 0.5*exp(-10^(E/10)/2)
tolerance: 0.5%

## What's noncoherent FSK's bit error rate at $E_b/N_0$ = {E} dB?

::: right
Right. $\frac{1}{2}e^{-E_b/2N_0}$ = {answer}.
:::

::: misses
- [0.5*exp(-E/2)] Convert the decibels to a ratio first.
- [any] Not yet. The FSK formula.
:::
:::

::: check
given: N = 1e6 | 1e9; E = 6 | 8
answer: N*Q(sqrt(2*10^(E/10)))
tolerance: 0.5%

## A BPSK link at $E_b/N_0$ = {E} dB carries {N} bits. How many errors should you expect?

::: right
Right. N × BER = {answer}.
:::

::: misses
- [any] Not yet. Bits times the error probability.
:::
:::

::: check
kind: parts
given: S = 6 | 12 | 20; B = 1 | 20; R = 2 | 54

## A link has {S} dB SNR in {B} MHz and carries {R} Mb/s.

::: part
answer: S + 10*log(B/R)
unit: dB
tolerance: 0.5%

### What is $E_b/N_0$?

::: misses
- [S] Convert with the bandwidth-to-rate ratio.
- [any] SNR + $10\log_{10}(B/R)$.
:::
:::

::: part
answer: R/B
unit: b/s/Hz
tolerance: 0.5%

### What spectral efficiency is that?

::: misses
- [any] Rate ÷ bandwidth.
:::
:::
:::

::: check
kind: parts
given: E = 4 | 7 | 9.6

## A BPSK link runs at $E_b/N_0$ = {E} dB.

::: part
answer: Q(sqrt(2*10^(E/10)))
tolerance: 1%

### What is its bit error rate?

::: misses
- [Q(sqrt(10^(E/10)))] BPSK's argument is $\sqrt{2E_b/N_0}$.
- [any] $Q(\sqrt{2E_b/N_0})$.
:::
:::

::: part
answer: 1/Q(sqrt(2*10^(E/10)))
tolerance: 1%

### About how many bits between errors?

::: misses
- [any] The reciprocal.
:::
:::
:::

::: explain
## Why are error rates compared using Eb/N0 instead of SNR?

::: model
SNR compares signal power with the noise power in the receiver's bandwidth, so it depends on how fast the link sends bits and how wide a band it uses. Two schemes at the same SNR can be spending very different amounts of energy on each bit: one might send ten bits per hertz and another only one. Energy per bit over the noise density strips out the rate and bandwidth, measuring how much energy the scheme needs to deliver one bit reliably against noise of a given density. That makes it the fair basis for comparing modulations, and it converts back to SNR by multiplying by the bandwidth over the bit rate.
:::
:::

::: practice

::: check
given: E = 0 | 0.5 | 2 | 4 | 6 | 8 | 9.6 | 11
answer: Q(sqrt(2*10^(E/10)))
tolerance: 0.5%

## BPSK BER at {E} dB?

::: misses
- [any] $Q(\sqrt{2E_b/N_0})$.
:::
:::

::: check
given: S = 1 | 40; B = 10 | 160; R = 0.1 | 10
answer: S + 10*log(B/R)
unit: dB
tolerance: 0.5%

## $E_b/N_0$: SNR {S} dB, {B} MHz, {R} Mb/s?

::: misses
- [any] $\text{SNR}_\text{dB} + 10\log(B/R_b)$.
:::
:::
:::
