Two numbers on one frequency
We want to send two numbers at the same time over one radio channel: I = 0.60 V and Q = 0.80 V for 2 ms, then I = −0.40 V and Q = 0.30 V. Can one carrier frequency carry both?
One oscillator makes cos(2π·fc·t) at fc = 2 kHz. A 90° phase shifter also makes −sin(2π·fc·t): the same wave, a quarter period (0.125 ms) earlier. The two are "in quadrature".
A mixer multiplies its two inputs. The I mixer makes I·cos(2π·fc·t), the Q mixer makes −Q·sin(2π·fc·t). Each product is a carrier whose size and sign follow its number, and change when the symbol changes.
The adder sums both products into s(t) = I·cos(2π·fc·t) − Q·sin(2π·fc·t), sent over the one channel. It is still a single 2 kHz wave; the two numbers set its size and its timing (phase).
Getting them back
The receiver splits s(t) into two arms. Its own oscillator, in step with the sender's, gives 2·cos and −2·sin. Each product wobbles at 2·fc = 4 kHz around a steady level.
Trigonometry: 2·cos·cos = 1 + cos(2·2πfc·t), but 2·sin·cos = sin(2·2πfc·t). So pI = I + ripple at 4 kHz. Q only adds ripple, which averages to zero over every carrier period.
A low-pass filter removes the 4 kHz ripple. Here it averages the last 0.5 ms, one carrier period, which cancels that ripple exactly. Out come I = 0.60 and Q = 0.80 V, then −0.40 and 0.30 V.
Points and phase
Draw each pair (I, Q) as a point. Its distance from the centre is the wave's amplitude (1.00 V, then 0.50 V); its angle is the phase (53.1°, then 143.1°). This picture is a constellation.
If the receiver's oscillator is 30° out of step, every point turns by 30°: (0.60, 0.80) comes out as (0.92, 0.39). I and Q leak into each other. Real receivers lock their phase with a loop.
Engineers write each pair as one complex number, x = I + jQ. Then s(t) = Re{x·e^(j2πfc·t)}. In Python with numpy: s = np.real((0.6+0.8j)*np.exp(2j*np.pi*fc*t)).
The working
# step 1/10 · two-numbers symbol 0 (0 to 2 ms): I = 0.60 V, Q = 0.80 V symbol 1 (2 to 4 ms): I = −0.40 V, Q = 0.30 V one channel: one carrier frequency fc = 2 kHz (a slow example; real radios use MHz to GHz, the maths is the same) question: can one frequency carry two numbers and still let the receiver pull them apart?
fc = 2 kHz and the two symbols are chosen so every number is easy to check; real radios put I and Q on carriers of MHz to GHz. Every curve and value in the figure is computed from this model by simulating the signals at 200 kHz. Books differ on the sign of the Q term: some write s(t) = I·cos + Q·sin. It only decides which way the Q carrier is shifted; the receiver uses the matching sign. The low-pass filter here is a moving average over one carrier period, chosen because it removes the 2fc ripple exactly. Real receivers use sharper low-pass filters and the matched filter from the lesson on it. The motion is slowed down a great deal: the oscillator hands really turn 2000 times a second.