1c = np.convolve(s, g)[:400]2y = np.convolve(c + n, h)[:400]3eye = swv(y, 51)[24::25]4plt.plot(t, eye.T)TXRCn(t)RXCLK0
0246810121416-1.5-1-0.500.511.5t (ms)voltsFILTER OUTPUT y(t)ideal wireτ = 0.2 msτ = 0.4 mswith noise010001110110111100.511.52-1.5-1-0.500.511.5time in slice (ms)voltsSCOPE: THE EYEideal wireτ = 0.2 msτ = 0.4 mswith noisesample2.00 Veye 1.28 Veye 0.60 V0.64 V = 6.4σthreshold 0 V
Coloured parts: what the current step is about; everything else rests in whiteBlocks: transmitter, RC wire, noise source, receive filter, oscilloscope, symbol clock, code cardPlots: the filter output y(t) with the scope's 2 ms window, and the scope screen where slices pile up into the eyeA slice token hops from the filter to the scope on every clock tickThe 16 bits 0100011101101111 are sent at 1000 bit/s as ±1 V NRZ pulses through an RC wire and averaged over each bit. An oscilloscope triggered once per bit overlays 2 ms slices of the result: the eye. Its height at the sampling instant is the noise margin; ISI and noise shrink it.

Building an eye

  1. Sixteen bits leave as ±1 V pulses, 1 ms each, through an RC wire (τ = 0.2 ms). The receive filter averages each bit. Its output y(t) wiggles up and down. Is every bit safely clear of 0 V? Hard to tell.

ISI closes it

Reading the margins

In Python

The working

# step 1/10 · stream

bits     0100011101101111
         (the word "Go" in ASCII, MSB first)
symbols  1 -> +1 V, 0 -> −1 V, NRZ, Tb = 1 ms
wire     RC low-pass, τ = 0.2 ms
filter   average over one bit (1 ms box)

y(t) is the receive-filter output: the
voltage the sampler would read at
t = 1, 2 … 16 ms

y lags the bits by the 1 ms average:
bit k is read at the END of its bit
time, so on the plot each sample sits
between two bit labels

the whole link: "Inside a digital
communication system"

The bits, the bit rate (1000 bit/s), the RC time constants (0.2 and 0.4 ms) and the noise level (σ = 0.5 V every 40 µs) are chosen example values. Every curve and number in the figure is computed from this model; the noise is a fixed pseudo-random draw. The waveforms are computed on a 40 µs grid (25 points per bit), so each slice has 51 points and times move in 40 µs steps. Q(x) is the chance that a Gaussian value lands more than x standard deviations above its mean. The error figures assume the filtered noise is Gaussian with σ = 0.1 V and count only the worst bit pattern.