AWGN Channel and BER Simulation

The AWGN Channel: The Fundamental Benchmark

The additive white Gaussian noise (AWGN) channel is the simplest and most important channel model. Every new modulation or coding scheme is first validated against AWGN BER curves before testing on fading channels. This section teaches you to simulate BER with proper statistical rigor.

Definition:

Additive White Gaussian Noise Channel

The AWGN channel models the received signal as:

r=s+n,n∼CN(0,N0)r = s + n, \quad n \sim \mathcal{CN}(0, N_0)

where ss is the transmitted symbol and nn is circularly symmetric complex Gaussian noise. The signal-to-noise ratio is:

SNR=EsN0,EbN0=EsN0log⁑2M\text{SNR} = \frac{E_s}{N_0}, \qquad \frac{E_b}{N_0} = \frac{E_s}{N_0 \log_2 M}

def awgn_channel(symbols, snr_dB, bits_per_symbol=1):
    snr = 10**(snr_dB / 10)
    Es = np.mean(np.abs(symbols)**2)
    N0 = Es / snr
    noise = np.sqrt(N0/2) * (np.random.randn(len(symbols))
            + 1j * np.random.randn(len(symbols)))
    return symbols + noise

Always be clear about whether SNR is per-symbol (Es/N0E_s/N_0) or per-bit (Eb/N0E_b/N_0). The difference is 10log⁑10(log⁑2M)10\log_{10}(\log_2 M) dB.

Definition:

Maximum Likelihood (ML) Symbol Detection

The ML detector selects the symbol that maximizes the likelihood:

s^=arg⁑min⁑sm∈S∣rβˆ’sm∣2\hat{s} = \arg\min_{s_m \in \mathcal{S}} |r - s_m|^2

This is equivalent to finding the nearest constellation point in Euclidean distance.

def ml_detect(received, constellation):
    """ML detection: nearest constellation point."""
    # Vectorized: broadcast over all constellation points
    distances = np.abs(received[:, None] - constellation[None, :])
    return np.argmin(distances, axis=1)

For BPSK and QPSK, ML detection simplifies to sign decisions on the I and Q components, avoiding the O(M)O(M) distance computation.

Theorem: Exact BER for M-QAM with Gray Coding

For rectangular MM-QAM with Gray coding over AWGN, the approximate BER (tight at moderate-to-high SNR) is:

Pbβ‰ˆ4log⁑2M(1βˆ’1M)Q ⁣(3log⁑2MMβˆ’1β‹…EbN0)P_b \approx \frac{4}{\log_2 M}\left(1 - \frac{1}{\sqrt{M}}\right) Q\!\left(\sqrt{\frac{3 \log_2 M}{M-1} \cdot \frac{E_b}{N_0}}\right)

For BPSK/QPSK: Pb=Q ⁣(2Eb/N0)P_b = Q\!\left(\sqrt{2E_b/N_0}\right).

The factor (1βˆ’1/M)(1 - 1/\sqrt{M}) accounts for edge and corner symbols having fewer nearest neighbors. The argument of QQ reflects the decreasing dmin⁑d_{\min} as MM grows.

Theorem: Clopper-Pearson Confidence Interval for BER

Given NeN_e errors in NN trials, the exact (Clopper-Pearson) 1βˆ’Ξ±1-\alpha confidence interval for BER is:

Pb∈[Bβˆ’1 ⁣(Ξ±2;Ne,Nβˆ’Ne+1),β€…β€ŠBβˆ’1 ⁣(1βˆ’Ξ±2;Ne+1,Nβˆ’Ne)]P_b \in \left[B^{-1}\!\left(\frac{\alpha}{2}; N_e, N-N_e+1\right),\; B^{-1}\!\left(1-\frac{\alpha}{2}; N_e+1, N-N_e\right)\right]

where Bβˆ’1B^{-1} is the inverse beta CDF. The relative half-width scales as 1/Ne1/\sqrt{N_e}.

You need at least 100 errors per SNR point for a tight confidence interval (about Β±20%\pm 20\% relative width at 95% confidence).

Theorem: SNR Penalty for Higher-Order Modulation

To achieve the same BER, MM-QAM requires approximately:

Ξ”Eb/N0β‰ˆ10log⁑10 ⁣(Mβˆ’13log⁑2M)βˆ’10log⁑10 ⁣(Mβ€²βˆ’13log⁑2Mβ€²)Β dB\Delta_{E_b/N_0} \approx 10\log_{10}\!\left(\frac{M-1}{3\log_2 M}\right) - 10\log_{10}\!\left(\frac{M'-1}{3\log_2 M'}\right) \text{ dB}

more Eb/N0E_b/N_0 than Mβ€²M'-QAM (for M>Mβ€²M > M'). Going from QPSK to 16-QAM costs about 3.8 dB; from 16-QAM to 64-QAM costs about 4.2 dB.

Each doubling of MM roughly halves dmin⁑d_{\min} for the same energy, requiring about 4 dB more SNR to compensate.

Example: Complete Vectorized BER Simulation

Implement a complete BER simulation for MM-QAM over AWGN with confidence intervals, and validate against theory.

Example: Converting Between Eb/N0 and Es/N0

Explain and implement the conversion between Eb/N0E_b/N_0 and Es/N0E_s/N_0 for different modulation orders.

BER Waterfall Curves

Explore BER versus Eb/N0E_b/N_0 for different modulation schemes. Toggle between theoretical and simulated curves.

Parameters

ML Decision Regions for 16-QAM

ML Decision Regions for 16-QAM
Maximum-likelihood decision regions for 16-QAM. Each Voronoi cell contains the received points that map to the same detected symbol.

Quick Check

For 64-QAM, what is the difference between Es/N0E_s/N_0 and Eb/N0E_b/N_0 in dB?

3.01 dB

6.02 dB

7.78 dB

10.0 dB

Common Mistake: Reporting BER with Too Few Errors

Mistake:

Stopping a BER simulation after a fixed number of bits regardless of how many errors were counted (e.g., 0 or 3 errors).

Correction:

Run until at least 100 errors are counted per SNR point. Report Clopper-Pearson confidence intervals. At Pb=10βˆ’5P_b = 10^{-5}, you need at least 10710^7 bits for 100 errors.

AWGN

Additive White Gaussian Noise: the simplest channel model where noise has flat spectral density and Gaussian amplitude distribution.

Related: Bit Error Rate (BER)

Bit Error Rate (BER)

The probability that a received bit differs from the transmitted bit; the primary performance metric for digital communication systems.

Related: Symbol Error Rate (SER)

Symbol Error Rate (SER)

The probability of detecting the wrong constellation symbol. Related to BER by Pbβ‰ˆPs/log⁑2MP_b \approx P_s / \log_2 M with Gray coding.