b01b10b21b31b40b50b61b70b0–b1–b2–b3–b4–b5–b6–b7–TX ±1VRX >0?1import numpy as np2rng = np.random.default_rng(0)3b = rng.integers(0, 2, 10**6)4n = rng.normal(0, 0.7071, 10**6)5y = 2*b - 1 + n6ber = np.mean((y > 0) != b)errors–bits–FLIP+1.00
−3−2−101230.00.20.40.6y (V)density (1/V)RECEIVED ysent 0sent 1y > 0 → 1, y < 0 → 0each tail = 0.0786−202468101210⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1Eb/N0 (dB)bit error rateBER10⁶ bits at 0 dB: 0.07890 dB → 0.07869.6 dB → 9.7 × 10⁻⁶dots: 10⁶ bits each
Coloured parts: what the current step is about; everything else rests in whiteBlocks: bits sent, transmitter, noisy channel, receiver, bits decided, error counter and a Python code cardPlots: the bell curves of the received value, and BER against Eb/N0 on a log scaleThe token carries one bit's voltage: clean, then noisy, then decidedPolar bits at ±1 V cross Gaussian noise of spread σ = 0.707 V (Eb/N0 = 0 dB) and are decided at 0 V; the bit error rate is Q(√(2·Eb/N0)). The Python card was run with numpy 2.4.4: rng = np.random.default_rng(0) and the six lines shown, then print(ber), gave 0.078482.

Bits through noise

  1. We send the byte 10110010. The transmitter turns each 1 into +1 V and each 0 into −1 V, one bit at a time. Two opposite values (polar signalling, the same as BPSK) are as far apart as the power allows.

Counting errors

Eb/N0

The waterfall curve

The working

# step 1/11 · polar

bit 1  ->  +1 V
bit 0  ->  −1 V

sent: 10110010
      +−++−−+−  (volts, one per bit time)

values are at the receiver's decision point,
after its matched filter, scaled so a clean
bit reads exactly ±1 V

Every number in the figure is computed from this model: polar bits at ±1 V, Gaussian noise of spread σ = A/√(2·Eb/N0), decided at 0 V. The 8 bits use one seeded noise draw, picked so exactly one bit flips (8 × 0.0786 = 0.63 flips are expected on average). The plotted dots are a seeded simulation of 10⁶ bits per point. Q(√(2·Eb/N0)) holds for two opposite values (BPSK or polar NRZ) with a matched filter in additive white Gaussian noise; other schemes have other curves. Real links also lose a few dB to filters, timing and amplifier noise, so the thermal floor k·T is a best case.