TXh[n]at T011p = np.repeat([2, 1], 4)2h = p[::-1] # flip3r = rng.normal(0, 1, 32)4r[8:16] += p5y = np.convolve(r, h)1
08152431-202n (sample)mVRECEIVED r[n]p: 8 samples · E = 20 mV²r = p + w · σ = 1 mVr[8] = 2.31 mV · SNR 4SNR(h) = (Σh·p)² / (σ²·Σh²)window: the pulse, ending at n08152431-505101520n (sample)mV²OUTPUT y[n]signal 20 · noise RMS 4.47SNR one 4 · sum 18 · MF 20threshold 0y[15] = 19.88 > 0 → 1average y[15] = 20
Coloured parts: what the current step is about; everything else rests in whiteBlocks: transmitter, noise source, matched filter h[n], sampler switch, decision lamp and a Python code cardPlots: the received samples r[n] with the sliding pulse window, and the filter output y[n]The token carries the pulse along the wire; the window slides one sample per tickA pulse p = 2, 2, 2, 2, 1, 1, 1, 1 mV in white noise of RMS 1 mV. The matched filter h = 1, 1, 1, 1, 2, 2, 2, 2 gives SNR = E/σ² = 20 at n = 15, more than any other filter. Real links use smooth Nyquist pulses rather than blocks. Splitting a raised-cosine response into a root-raised-cosine filter at the transmitter and the same filter at the receiver makes the receiver a matched filter while keeping zero intersymbol interference.

A pulse in noise

  1. To send a 1, the transmitter puts out a pulse whose shape the receiver knows in advance: p = 2, 2, 2, 2, 1, 1, 1, 1 mV, one value per sample. Its energy is the sum of squares: E = 20 mV².

Filter, then sample

Why it is the best

Decide, and code

The working

# step 1/10 · pulse

pulse  p[k] = 2, 2, 2, 2, 1, 1, 1, 1  (mV)
       k = 0 .. 7, L = 8 samples

energy E = Σ p[k]²
       = 4 × 2² + 4 × 1²
       = 20 mV²

polar bits: 1 -> +p, 0 -> −p
(line coding, from earlier in this module)

The pulse p = 2, 2, 2, 2, 1, 1, 1, 1 mV and the noise RMS σ = 1 mV are chosen example values. The noise on the plots is one draw from a seeded random generator; the SNR values are exact averages over all draws, and every number in the figure is computed from this model. In continuous time the same result reads SNR_max = 2E/N0, where N0/2 is the two-sided power spectral density of the white noise and E the pulse energy. The discrete σ² plays the part of N0/2.