The idea: bits pick a point, the point shapes the wave
A radio cannot send a 0 or a 1 directly. It sends a carrier, a fast sine wave, and changes it a little for each symbol. A modulator cuts the bits into groups of k. Each group picks one point of a constellation, a small map of allowed (I, Q) pairs. The point sets the carrier's size and its shift for one symbol time. The receiver measures (I, Q) again and looks up the bits.
I and Q: two carriers in one
The transmitter adds two carriers of the same frequency: a cosine scaled by I (in-phase) and a sine scaled by Q (quadrature):
A cosine and a sine of the same frequency do not disturb each other, so the receiver can take them apart again. Together they make one sine with amplitude √(I² + Q²) and phase atan2(Q, I). So a point far from the centre is a strong carrier, and the angle of the point is the carrier's shift. The page draws 2 carrier cycles per symbol so you can see the shape; a real Wi-Fi carrier at 2.4 GHz runs thousands of cycles per symbol. On the canvas, s(t) at the start of each symbol equals I, and an eighth of a symbol later it equals −Q (Demo 2: 0.949, then −0.316 for symbol 1).
Four constellations at equal power
The page uses the tables of IEEE 802.11 (Wi-Fi). Each axis has L levels −(L−1), …, −1, +1, …, +(L−1), times a factor K that makes the average power of all points exactly 1. That is fair: a transmitter has a power limit, so a denser scheme must squeeze its points into the same space.
| scheme | bits per symbol | points | levels per axis | K | closest points dmin | at 1 Msymbol/s |
|---|---|---|---|---|---|---|
| BPSK | 1 | 2 | 2 (I only) | 1 | 2.000 | 1 Mbit/s |
| QPSK | 2 | 4 | 2 | 1/√2 | 1.414 | 2 Mbit/s |
| 16-QAM | 4 | 16 | 4 | 1/√10 | 0.632 | 4 Mbit/s |
| 64-QAM | 6 | 64 | 8 | 1/√42 | 0.309 | 6 Mbit/s |
Every scheme sends the same number of symbols per second, so bits per symbol is the speed-up (Demos 1–3: 8, 16 and 24 bits in 4 symbols). The price is the smaller gap dmin.
Noise and decision regions
On the way, the signal picks up noise. The page adds Gaussian noise to I and to Q, with σ = √(1 / (2·SNR)) on each axis, where SNR = Es/N0 is the symbol energy over the noise power, written in decibels (10 dB = 10 times, 20 dB = 100 times). The receiver cannot know the sent point, so it picks the nearest one. The grey lines halfway between levels cut the plane into decision regions. A received dot in the wrong square is a symbol error.
What matters is σ against half the gap, dmin/2. At 10 dB, σ = 0.224. QPSK's half gap is 0.707, so none of 200 dots crosses a border (Demo 4). 16-QAM's half gap is 0.316, only 1.4 σ, and 42 of 200 symbols go wrong (Demo 5). 64-QAM at 20 dB has σ = 0.071 against a half gap of 0.154 and still loses 13 symbols (Demo 6). The noise is from a seeded generator, so a scheme and an SNR always give the same 200 dots.
Gray coding: one wrong neighbour, one wrong bit
Noise usually pushes a point just over one border, to a neighbour. Gray coding labels the levels so that neighbours differ in exactly one bit: 00, 01, 11, 10 instead of counting 00, 01, 10, 11. Then most symbol errors cost a single bit. In Demo 5 the 42 symbol errors make 43 bit errors. With plain counting labels the same 200 noisy dots would give 60 bit errors, because the step from 01 to 10 flips two bits.
The leftover bit errors are what error-correcting codes repair; see Hamming code for the idea of adding check bits.
Adaptive modulation
A link that always used 64-QAM would fail at the cell edge, and one that always used BPSK would waste a good channel. So real links measure the SNR and pick the densest scheme that still works: adaptive modulation. The page's rule is "at most 1 % symbol errors", using the standard error formulas for Gaussian noise, rounded up to a whole dB.
| scheme | SNR needed (≤ 1 % symbol errors) | picked when SNR is |
|---|---|---|
| BPSK | 5 dB (exactly 4.33) | 5 … 8 dB (and below, with a warning) |
| QPSK | 9 dB (8.22) | 9 … 15 dB |
| 16-QAM | 16 dB (15.66) | 16 … 22 dB |
| 64-QAM | 23 dB (22.05) | 23 dB and up |
At 20 dB the link picks 16-QAM: 64-QAM would need 23 dB, and Demo 6 shows what 64-QAM does at 20 dB (13 of 200 wrong). Demo 7 runs the choice and then sends 200 symbols with 0 errors. From QPSK on, each step up costs about 6–7 dB more, because doubling the levels per axis about halves the gap. Wi-Fi does this with its MCS index (modulation and coding scheme) and LTE with the CQI the phone reports; Wi-Fi channel access and cellular reuse and handover show why the SNR changes from place to place.
See also sampling and aliasing for how the receiver turns the wave into numbers, and Fourier transform and FFT for the spectrum view of a carrier.
See also ADC and PWM for how an ADC turns a voltage into a code and how PWM with an RC filter acts as a cheap DAC.
What the page leaves out
The pulses are rectangles; real transmitters shape them (raised-cosine filters) so the spectrum stays narrow. The receiver here knows the carrier's exact frequency and phase; real ones must recover them and correct for fading, which rotates and shrinks the whole constellation. The channel adds only white Gaussian noise: no fading, interference or multipath. Error-correcting codes, OFDM (many carriers side by side, as in Wi-Fi and LTE), 256-QAM and 1024-QAM, PSK schemes with 8 phases and the exact bit-error formulas are not shown. SNR is per symbol (Es/N0), not per bit (Eb/N0).