1t = np.arange(32) / 320002c1 = np.cos(2*np.pi*5000*t)3c0 = np.cos(2*np.pi*3000*t)4bit = int(r @ c1 > r @ c0)01010101OSCKEYCORR01010101f = 4 kHzy = 0.00
01234-101t (ms)s (V)WAVE s(t)1011carrier 4 kHzASK (OOK)FSK 5 / 3 kHz02468-40-30-20-100f (kHz)power (dB)SPECTRUM (DFT)ASKASKFSKFSKASK0123400.20.40.6t (ms)y (V·ms)CORRELATOR ythreshold 0.25ASK, fullfullASK, 40%y0 3ky1 5k
Coloured parts: what the current step is about; everything else rests in whiteBlocks: bit lamps, oscillator, keying switch, antennas, correlator, decided-bit lamps and a Python cardPlots: the transmitted wave s(t), and the DFT spectrum or the correlator outputsCrests in the air move in slow motion, one per carrier cycle; the pills show the frequency and the correlator valueBits 1 0 1 1 sent by on-off keying (a 4 kHz carrier switched on and off) and by binary FSK (5 kHz for a 1, 3 kHz for a 0), then recovered by correlator receivers at full and at 40% strength.

Bits need a carrier

  1. We want to send four bits, 1 0 1 1, one every millisecond: a bit time Tb = 1 ms, so 1000 bits per second. Bits cannot fly through the air on their own. They must ride on a radio wave.

Keying the amplitude

Keying the frequency

Getting the bits back

In code and in the world

The working

# step 1/11 · bits

bits      1 0 1 1
bit time  Tb = 1 ms
bit rate  Rb = 1 / Tb = 1000 bit/s

the numbers are scaled down so you can
see every wave cycle; a real radio link uses
carriers of MHz or GHz and far faster bits

The numbers are scaled down so each carrier cycle can be seen: 1000 bits per second on carriers of 3 to 5 kHz, 1 V tall, sampled 32000 times a second. Real radio links use carriers of MHz or GHz. Every value and curve in the figure is computed from this model. The waves in the air move in slow motion: a real radio wave crosses a room in a few nanoseconds. The 40% received strength is a chosen example, and noise is left out so the effect of strength alone is clear. The spectra are averages of |DFT|² over 64 blocks of 16 random bits, in decibels relative to the highest bin; values below -45 dB are drawn at -45 dB.