A receiver sees voltages, not bits. This chapter models the channel, from erasures and one-way faults to Gaussian noise and bursts, and derives the optimal receiver, the decibel budget and the log-likelihood ratio.
The previous chapter, Probability for Coding, treated a channel as one number, the probability p that a bit flips, and closed with a voltage example in which each bit left the transmitter as a pulse of ±1 volt and arrived blurred by Gaussian noise. The receiver in that example compared each voltage with zero, kept the resulting bit and threw the voltage away. That choice was never justified. A voltage of 0.05 and a voltage of 1.9 both became the same bit, although the first is nearly a coin toss and the second is nearly certain.
This chapter asks what a receiver should do with what it sees. Three discrete channels that fail in different ways come first, with a proof that choosing the most probable input makes the fewest errors. The Gaussian channel follows, with enough geometry to prove that the matched filter is the best way to collapse a noisy pulse into one number, then the decibel scale, a measured comparison of hard and soft decisions, and the log-likelihood ratio that later decoders consume. The chapter ends with channels that remember, through the Gilbert–Elliott model of bursts, and with the faults that memory codes survive.
The tools are Bayes' rule, the Gaussian density and the Q-function from the previous chapter, plus a little vector algebra built here from nothing. Every number in the chapter is recomputed by ch03_channels_signals_and_likelihoods.py, in the python/ folder of the companion repository ecc-book-lab, which prints each value beside the one the text states and stops at the first disagreement. The charts are drawn by ch03_charts.py in the same folder.
Send the four bits 1011 through three channels, each with a fault probability of 0.1 per bit, and look at one particular output from each.
On the binary symmetric channel of the previous chapter, written BSC(p), every bit flips with probability p=0.1 whatever its value. The output 1001, with only the third bit flipped, has probability 0.9×0.9×0.1×0.9=0.0729. The receiver sees a word that looks perfectly valid and has no idea which bit, if any, is wrong.
On the binary erasure channel, written BEC(ε), a bit is never flipped. With probability ε=0.1 it is lost, and the receiver sees a third symbol, written ?, in its place. The output 1?11 has probability 0.93×0.1=0.0729, the same number, but now the receiver knows exactly where the damage is. A disk sector that fails its own internal check, or a network packet that never arrives, behaves this way.
On the Z-channel, written Z(p), only one direction of fault happens. A 1 becomes 0 with probability p=0.1, and a 0 always arrives as 0. It models a memory cell that stores a 1 as charge, since charge can leak away but cannot appear from nothing. The output 1001 needs the third bit, a 1, to drop, while the two other 1s survive with probability 0.9 each and the 0 survives with certainty, so its probability is 0.9×1×0.1×0.9=0.081.
The three products above are this formula with three different tables of transition probabilities, drawn in Figure 1 and listed in Table 1.
Figure 1. Transition diagrams of BSC(p), BEC(ε) and Z(p). Each arrow carries the probability of that output given that input, and the arrows leaving each input add to 1. Only the erasure channel has an output that reports its own failure.
Table 1. What can go wrong on each channel
Channel
Outputs
P(wrong bit∣0)
P(wrong bit∣1)
P(?∣x)
Damage located
BSC(p)
0, 1
p
p
0
no
BEC(ε)
0, ?, 1
0
0
ε
yes
Z(p)
0, 1
0
p
0
no, but only a 1 is at risk
Source: the definitions of the three channels.
The repetition code R3 of Why Codes Exist, which sends every bit three times, fares differently on each channel, and each channel calls for its own decoder. On BSC(0.1) the majority vote fails when two or more copies flip, with probability 3p2−2p3=0.028. On BEC(0.1) a surviving copy is never wrong, so one survivor is enough, and decoding fails only when all three copies are erased, with probability ε3=0.001. Even then a guess is right half the time, so the bit error probability is 0.0005.
On Z(0.1) a received 1 can only have come from a sent 1, because a 0 never turns into a 1. The decoder that respects this outputs 1 if any copy reads 1, and 0 otherwise. It never errs on a sent 0, and it errs on a sent 1 only when all three copies drop, with probability p3=0.001, so with equally likely bits its error probability is 0.0005. A majority vote on the same channel fails on a sent 1 whenever two or more copies drop, with probability 3p2(1−p)+p3=0.028, or 0.014 averaged over equally likely bits. The rule that matches the channel is 28 times better.
The asymmetry also changes what a received bit means. With equally likely inputs, a received 0 on Z(0.1) comes from a sent 0 with probability 0.5 and from a dropped 1 with probability 0.5×0.1=0.05, so Bayes' rule gives P(X=1∣Y=0)=0.05/0.55=0.0909. A received 1 is certain and a received 0 is doubtful.
A sensor line carries a rare alarm bit. It sends 1 with probability 0.05 and 0 otherwise, over BSC(0.1), and the receiver sees a 1. Bayes' rule from Probability for Coding gives the probability that an alarm was really sent,
A received 1 is more likely a flipped 0, with probability 0.095, than a true alarm, with probability 0.045. On a received 0 the two candidates have probabilities 0.1×0.05=0.005 for an alarm and 0.9×0.95=0.855 for no alarm. A receiver that always reports the more probable input therefore says 0 whatever it sees, and it is wrong exactly when an alarm was sent, with probability 0.05. A receiver that believes the channel and reports the received bit is wrong whenever the channel flips, with probability 0.1. Always saying 0 makes half as many errors.
Proof. A decision rule is correct exactly when the input equals the decision made for the output that occurred. The events "Y=y and X=x^(y)" for different outputs y cannot happen together, so their probabilities add, and
Each term of the sum depends only on the decision made for its own y. The sum is therefore as large as possible when every term is as large as possible, which means choosing, for each y, the input x that maximizes P(y∣x)P(x). That is the MAP rule. The probability of error is 1−P(correct), so the MAP rule minimizes it. For a continuous output such as a voltage, the sum becomes an integral and P(y∣x) becomes a density f(y∣x), and the argument is unchanged, since an integral is largest when its integrand is largest at every point. ■
On the binary symmetric channel the ML rule takes a familiar form. Recall from Why Codes Exist that the Hamming distance between two words of equal length is the number of positions in which they differ.
Proof. Let a codeword c of length n differ from the received word y in d positions. By Equation 1, those d positions each contribute a factor p and the other n−d positions each contribute 1−p, so
P(y∣c)=pd(1−p)n−d=(1−p)n(1−pp)d.
(4)
Because p<1/2, the ratio p/(1−p) is less than 1, so the likelihood strictly decreases as d grows. The largest likelihood belongs to the smallest distance. ■
The majority vote of Why Codes Exist was therefore not a rule of thumb. With equally likely inputs on a binary symmetric channel, it is the optimal decoder of R3. The same reasoning applied to the likelihoods of the Z-channel produces its any-1 rule, and applied to the erasure channel it says to ignore the erased copies.
A transmitter cannot send a bit. It sends a physical quantity, a voltage on a wire or the phase of a radio wave, and the simplest way to carry one bit is to send one of two opposite values. Binary phase-shift keying, or BPSK, sends the amplitude +a or −a, named after the radio version, which shifts a carrier wave by half a cycle.
This book maps bit 0 to +a and bit 1 to −a, the reverse of the voltage example in Probability for Coding. The reason is algebraic. The amplitude for bit b is then a(−1)b, and the exclusive-or of two bits, written ⊕, becomes a product of signs, (−1)b1⊕b2=(−1)b1(−1)b2, which can be checked on the four cases. Parity checks are exclusive-ors, so they turn into products of signs when later chapters decode directly from voltages.
The received value is y=x+n, where x=±a is the sent amplitude and n is noise. With a=1 and noise standard deviation σ=0.5, the values of the previous chapter, a sent 0 produces a y distributed as N(1,0.25) and a sent 1 produces N(−1,0.25).
The ML decision compares the two likelihoods. Their ratio is
since the constant in front cancels and (y+a)2−(y−a)2=4ay. The exponential exceeds 1 exactly when its exponent is positive, so the ML receiver decides 0 when y>0 and 1 when y<0. The threshold at zero was the maximum likelihood rule all along. It errs on a sent 0 when the noise pushes y below zero, that is when n<−a, which has probability Q(a/σ)=Q(2)=0.02275, and by symmetry the same holds for a sent 1.
With unequal priors π0=P(b=0) and π1=P(b=1), the MAP rule decides 0 when π0f(y∣+a)>π1f(y∣−a). Dividing both sides by π0f(y∣−a) and taking logarithms turns this into 2ay/σ2>ln(π1/π0), so the threshold moves from zero to
τ=2aσ2lnπ0π1.
(6)
When 0 is the more likely bit, π1<π0, the logarithm is negative and the threshold slides toward −a, enlarging the region that decides 0. The shift is proportional to σ2, so a quiet channel barely moves the threshold and a noisy one leans on the prior. Figure 2 draws the case π0=0.9, which Worked Examples carries through to its error probability.
Figure 2. Prior-weighted likelihoods π0f(y∣+1) and π1f(y∣−1) for BPSK with a=1, σ=0.5 and π0=0.9. The MAP threshold sits where the curves cross, at τ=−0.275, while the ML threshold stays at 0. Data: computed by ch03_charts.py in the companion repository.
A real pulse is not a single number. Suppose bit 0 is sent as a pulse whose shape, sampled four times, is s=(0.1,0.7,0.7,0.1), and bit 1 as −s, and that each sample picks up independent Gaussian noise with σ=1. The energy of the pulse, the sum of its squared samples, is 0.01+0.49+0.49+0.01=1. The receiver must combine four noisy samples into one number before comparing it with zero, and Table 2 tries three ways.
Using only the second sample gives a signal of 0.7 against noise of standard deviation 1, and an error probability Q(0.7)=0.2420. Adding all four samples gives a signal of 1.6, but the noise variances of the four samples add too, to 4, so the noise standard deviation is 2 and the error probability is Q(0.8)=0.2119. Weighting each sample by the pulse itself, so that the receiver computes 0.1y1+0.7y2+0.7y3+0.1y4, gives a signal of 0.01+0.49+0.49+0.01=1 and a noise variance of 0.01+0.49+0.49+0.01=1, and an error probability Q(1)=0.1587. The rest of this section proves that no weighting beats the pulse-weighted sum.
Table 2. Three ways to combine four noisy samples of the pulse (0.1,0.7,0.7,0.1) with σ=1
Combiner
Signal
Noise standard deviation
Signal over noise
Error probability
Second sample only
0.7
1
0.7
0.2420
Plain sum
1.6
2
0.8
0.2119
Weighted by the pulse
1
1
1
0.1587
Source: computed from the Q-function and reproduced by ch03_channels_signals_and_likelihoods.py.
The proof needs two pieces of vector algebra. A vector here is an ordered list of n real numbers, such as the four samples y=(y1,y2,y3,y4), and vectors add and scale entry by entry.
Proof. If v is all zeros, both sides are 0 and v=0⋅u. Otherwise, for any real number t, a sum of squares cannot be negative, so
0≤∥u−tv∥2=i∑(ui−tvi)2=∥u∥2−2t⟨u,v⟩+t2∥v∥2.
Choose t=⟨u,v⟩/∥v∥2. The right side becomes ∥u∥2−2⟨u,v⟩2/∥v∥2+⟨u,v⟩2/∥v∥2=∥u∥2−⟨u,v⟩2/∥v∥2. Multiplying the inequality by ∥v∥2 gives ⟨u,v⟩2≤∥u∥2∥v∥2, and taking square roots gives the lemma. Equality holds exactly when ∥u−tv∥=0, which means u=tv. ■
Proof. The output splits as z=±⟨w,s⟩+⟨w,n⟩. The noise part ∑iwini has mean 0, and its variance is ∑iwi2σ2=σ2∥w∥2, because variances of independent terms add and multiplying a variable by wi multiplies its variance by wi2, two rules proved in Probability for Coding. The ratio is therefore
σ2∥w∥2⟨w,s⟩2≤σ2∥w∥2∥w∥2∥s∥2=σ2∥s∥2
by the Cauchy–Schwarz inequality, with equality exactly when w is a multiple of s. ■
A weighted sum of independent Gaussians is again Gaussian, a standard fact proved in Grinstead and Snell [1], so the error probability of a weighting is Q of the square root of this ratio, and the largest ratio gives the smallest error. Weighting by a positive multiple of the pulse is called a matched filter, a result that goes back to North's analysis of radar receivers [2]. For the four-sample pulse, ∥s∥2/σ2=1, the last row of the table.
The theorem compares only weighted sums, so it leaves open whether a nonlinear receiver could do better. It cannot. With independent noise, Equation 1 and Equation 5 give the density of the whole received vector as a product, and the exponents add,
This is largest when ∥y−x∥ is smallest, so the ML receiver picks the signal point nearest to what was received. Expanding the two squared distances, ∥y−s∥2=∥y∥2−2⟨y,s⟩+∥s∥2 and ∥y+s∥2=∥y∥2+2⟨y,s⟩+∥s∥2, so ∥y−s∥2−∥y+s∥2=−4⟨y,s⟩. The received point is nearer to s exactly when ⟨y,s⟩>0. The matched filter followed by a threshold at zero is the ML receiver among all receivers, linear or not.
Figure 3 shows the geometry with two samples. For s=(0.6,0.8) and the received point y=(0.9,−0.1), the inner product is 0.54−0.08=0.46, the squared distance to s is 0.09+0.81=0.90 and to −s it is 2.25+0.49=2.74. The difference, 1.84, is four times 0.46, and the receiver decides 0.
Figure 3. Signal space for two samples. The boundary between the decisions is the line of points equidistant from s and −s, which is the line ⟨y,s⟩=0. The received point y=(0.9,−0.1) has squared distance 0.90 to s and 2.74 to −s. Data: computed by ch03_charts.py in the companion repository.
A receiver on a wire sees a waveform r(t)=±s(t)+n(t) over a bit interval from time 0 to time T, not a list of samples. Sums become integrals, ⟨r,s⟩=∫0Tr(t)s(t)dt, and the pulse energy is Es=∫0Ts(t)2dt. The correlator receiver multiplies the incoming waveform by a stored copy of the pulse and integrates over the bit interval, as Figure 4 shows. A filter whose impulse response is the pulse reversed in time, h(t)=s(T−t), produces the same number at time T, because its output there is ∫r(τ)h(T−τ)dτ=∫r(τ)s(τ)dτ. That filter gives the matched filter its name.
White noise in continuous time is described by its two-sided noise density N0/2. For this book its meaning is what the correlator sees, a Gaussian noise term ∫0Tn(t)s(t)dt with mean 0 and variance EN0/2 for a pulse of energy E. Dividing the correlator output by Es turns it into y=±Es+n with noise variance σ2=N0/2, and every continuous-time BPSK link reduces to the one-number channel of the previous section.
Figure 4. The correlator receiver. Multiplying by the expected pulse and integrating over one bit interval computes ⟨r,s⟩, and the comparator applies the ML threshold. A filter with impulse response s(T−t) sampled at time T computes the same number.
With one bit per pulse the pulse energy is the energy per bit, Es=Eb, and the error probability follows in one line. The received value is ±Eb plus noise of standard deviation N0/2, so a threshold at zero errs with probability Q(Eb/N0/2).
The four-sample example fits this formula. Its pulse energy is 1 and σ2=1=N0/2, so N0=2, Eb/N0=0.5 and Pb=Q(1)=0.1587, the matched row of Table 2.
A codeword sent as a sequence of BPSK pulses of energy Es is a point in a space with one coordinate per bit. Two codewords that differ in d bits sit 2Es apart in each of those d coordinates and agree in the rest, so their squared Euclidean distance is 4Esd. The nearest-point rule on the Gaussian channel and the minimum-distance rule on the binary symmetric channel are the same idea in two geometries.
Doubling a transmitter's power from 1 milliwatt to 2 milliwatts is a ratio of 2, which engineers report as 3.010 dB, since 10log102=3.010.
The logarithm turns products into sums, so a chain of gains and losses becomes a sum of decibel values, and ratios from 1 to a million fit between 0 and 60 dB. Measured against the matched filter's ratio of 1, the plain sum's squared signal-over-noise ratio of 0.82=0.64 is a loss of 1.94 dB, and the single sample's ratio of 0.72=0.49 is a loss of 3.10 dB.
The voltage example of Probability for Coding also fits. A pulse of a=1 volt carries Eb=a2=1 in units where noise variance is measured in volts squared, and σ2=0.25=N0/2 gives N0=0.5. So Eb/N0=2, which is 3.01 dB, and Equation 8 gives Q(4)=Q(2)=0.02275, the error probability that chapter found. Table 3 extends this to the range where practical links operate.
Table 3. Uncoded BPSK, Pb=Q(2Eb/N0), at even steps of Eb/N0
Eb/N0 (dB)
Eb/N0 (ratio)
2Eb/N0
Pb
0
1
1.4142
0.07865
2
1.5849
1.7804
0.03751
4
2.5119
2.2414
0.01250
6
3.9811
2.8217
0.002388
8
6.3096
3.5523
1.909×10−4
10
10
4.4721
3.872×10−6
12
15.849
5.6301
9.006×10−9
Source: computed from the Q-function and reproduced by ch03_channels_signals_and_likelihoods.py.
From 0 to 2 dB the error probability halves, while from 10 to 12 dB it falls by a factor of about 430, because the Q-function's tail decays like e−x2/2 and each step multiplies x2. Read backward, the table answers the design question of how much Eb/N0 a target error rate needs. For Pb=10−5, solving Q(x)=10−5 gives x=4.2649, so 2Eb/N0=18.189, Eb/N0=9.0946, or 9.588 dB. About 9.6 dB is the yardstick against which codes are judged.
A code charges for its redundancy in energy. A code of rate Rc=k/n sends n pulses for every k data bits, and the transmitter's budget is fixed per data bit, so each pulse receives
Es=RcEb.
For R3, Rc=1/3 is −4.771 dB, so each copy arrives 4.771 dB weaker than an uncoded bit would. Every comparison in this book is made at equal Eb/N0, so that a code pays for every redundant bit it sends.
Signal-to-noise ratio, SNR, is signal power over noise power in a bandwidth B. Signal power is energy per bit times the bit rate Rb, and noise power is N0B, so SNR=(Eb/N0)(Rb/B). In decibels the factors add. At Rb=1 Mbit/s in B=2 MHz the factor Rb/B=1/2 is −3.010 dB, and the 9.588 dB needed for 10−5 becomes an SNR of 6.578 dB.
Send a bit with R3 at Eb/N0=4 dB. Each copy carries Es=Eb/3, so its own ratio is 4−4.771=−0.771 dB, a ratio of 0.8373, and thresholding each copy separately makes an error with probability p=Q(2×0.8373)=0.09782. Majority voting then fails with probability 3p2−2p3=0.02684. Uncoded BPSK at the same 4 dB fails with probability 0.01250, so the code has made matters worse by a factor of 2.15.
The soft ML decoder of R3 receives y=(y1,y2,y3) with each yi=±Es+ni. The two codewords are the points ±Es(1,1,1), and the nearest-point rule picks the codeword for 0 exactly when y1+y2+y3>0, which is the matched filter for that pulse shape. The sum carries signal 3Es and noise variance 3σ2, so it errs with probability
Q(3σ3Es)=Q(σ3Es)=Q(N02Eb),
using 3Es=Eb and σ2=N0/2. Soft-decision R3 performs exactly like uncoded BPSK. Repetition spreads the same energy over three pulses and the soft decoder gathers it back, so nothing is gained and nothing is lost. The hard decoder throws information away at the thresholds and loses ground, as Table 4 and Figure 5 show.
Table 4. R3 with hard and soft decisions, against Eb/N0
Eb/N0 (dB)
p per copy
Hard R3
Soft R3, equal to uncoded
Hard over soft
4
0.09782
0.02684
0.01250
2.15
6
0.05164
0.007726
0.002388
3.23
8
0.02014
0.0012001
1.909×10−4
6.29
10
0.004912
7.214×10−5
3.872×10−6
18.6
Source: computed from the Q-function and reproduced by ch03_channels_signals_and_likelihoods.py.
Figure 5. Bit error probability of uncoded BPSK, which equals soft-decision R3, and of hard-decision R3. At Pb=10−5 the hard decoder needs 11.03 dB against 9.59 dB, a loss of 1.44 dB. Data: computed by ch03_charts.py in the companion repository.
The gap widens as the channel improves. Hard-decision R3 reaches 10−5 only at 11.029 dB, against 9.588 dB for soft decisions, a loss of 1.441 dB, which is a power ratio of 100.1441=1.393, or 39% more transmitted power. The threshold discards how far each voltage was from zero, and on a weak copy that distance is most of the evidence.
With a=1 and σ=0.5, the received values y=0.05 and y=1.9 both lie above the threshold and both decode to 0. Their likelihood ratios tell them apart. From the Gaussian Channel section the ratio is f(y∣0)/f(y∣1)=exp(2ay/σ2)=e8y, which is e0.4=1.49 for the first value and e15.2≈3.99×106 for the second. The first is barely evidence at all, the second is overwhelming, and a decoder should know the difference.
For BPSK on the AWGN channel, the channel LLR comes out of Equation 5 in four steps. The constant 1/(2πσ) appears above and below and cancels, and the logarithm of an exponential is its exponent,
Expanding both squares, the y2 and a2 terms cancel,
2σ2−(y2−2ay+a2)+(y2+2ay+a2)=2σ24ay,
which leaves
L(b∣y)=σ22ay.
(10)
The LLR is the received voltage times a constant set by the channel, so the receiver computes it with one multiplication. With a=1 and σ=0.5 the constant is 8, and the two values above have LLRs 0.4 and 15.2.
Proof. Write P0=P(b=0∣y), so that P(b=1∣y)=1−P0 and eL=P0/(1−P0). Multiplying out gives eL−eLP0=P0, so P0(1+eL)=eL and P0=eL/(1+eL). Dividing above and below by eL gives 1/(1+e−L), and 1−P0=1/(1+eL) follows by subtraction. ■
For y=0.05 the posterior probability of 0 is 1/(1+e−0.4)=0.5987, and for y=1.9 it is 0.99999975. A hard decision assigns both the same confidence. After thresholding, the channel from bit to decided bit is a binary symmetric channel with p=Q(a/σ)=Q(2)=0.02275, and on BSC(p) a received 0 has LLR ln((1−p)/p)=3.760, whatever voltage produced it. Figure 6 sets the two side by side. The soft LLR 8y exceeds the hard value when ∣y∣>0.470 and falls short of it nearer the threshold, so the hard receiver is overconfident about the doubtful values and underconfident about the clear ones. Table 5 lists the channel LLRs of every channel in this chapter.
Figure 6. Soft and hard LLRs for BPSK with a=1 and σ=0.5. The soft LLR L=8y grows with the distance from the threshold, while the hard decision reports ±3.76 for every voltage. The two agree only at ∣y∣=0.470. Data: computed by ch03_charts.py in the companion repository.
Table 5. Channel LLRs, with 0 sent as +a on the AWGN channel
Channel
Observation
Channel LLR
Example
BSC(p)
received 0 or 1
±ln((1−p)/p)
±2.197 at p=0.1
BEC(ε)
received 0 or 1
+∞ or −∞
certain
BEC(ε)
received ?
0
no evidence
Z(p)
received 0
ln(1/p)
2.303 at p=0.1
Z(p)
received 1
−∞
certain
AWGN with BPSK
voltage y
2ay/σ2
8y at a=1, σ=0.5
Source: derived from each channel's transition probabilities and reproduced by ch03_channels_signals_and_likelihoods.py.
Proof. Bayes' rule gives P(b∣y1,y2)=P(y1,y2∣b)P(b)/P(y1,y2), and independence given b factors the likelihood as P(y1∣b)P(y2∣b). In the ratio of the posteriors for b=0 and b=1 the denominator cancels, leaving the product of three ratios, P(y1∣1)P(y1∣0)⋅P(y2∣1)P(y2∣0)⋅P(b=1)P(b=0). The logarithm of a product is the sum of the logarithms. ■
Applied repeatedly, the theorem gives the soft decoder of R3 directly. With a=1 and σ=0.8 the constant is 2a/σ2=3.125. If 0 is sent and the three copies arrive as (0.9,−0.2,−0.3), their LLRs are 2.8125, −0.625 and −0.9375, which sum to 1.25, so the decoder says 0 with posterior probability 1/(1+e−1.25)=0.7773. The hard decoder sees 0, 1, 1 and votes 1, which is wrong. The LLR sum is 3.125 times the voltage sum 0.4, so this is the soft decoder of the previous section with the confidence attached.
Every channel so far has been memoryless. Real channels often remember, since a scratch on a disc or a fade on a radio link damages many consecutive bits and then stops. The simplest model gives the channel a hidden state that persists.
Take a channel that is usually in a good state, where each bit flips with probability pG=0.001, and occasionally in a bad state, where each bit flips with probability pB=0.1. After each bit, a good channel turns bad with probability b=0.01 and a bad channel recovers with probability g=0.09. Gilbert introduced the model with error-free good states [3], and Elliott allowed errors in both [4].
Figure 7. The Gilbert–Elliott channel with b=0.01, g=0.09, pG=0.001 and pB=0.1. Each arrow is a transition probability per bit, and each state flips bits at its own rate while it lasts.
The long-run fraction of time in the bad state follows from the recursion in the next theorem.
Proof. By the law of total probability, conditioning on the current state, πB(t+1)=(1−g)πB(t)+b(1−πB(t)), which rearranges to Equation 13. The value π∗=b/(b+g) is a fixed point of the recursion, since (1−b−g)b/(b+g)+b=(b−b2−bg+b2+bg)/(b+g)=b/(b+g). Subtracting the fixed-point equation from the recursion gives πB(t+1)−π∗=(1−b−g)(πB(t)−π∗), and repeating it t times gives πB(t)−π∗=(1−b−g)t(πB(0)−π∗), which tends to 0 when ∣1−b−g∣<1. Finally πG=1−πB=g/(b+g). ■
For the example, πB=0.01/0.1=0.1 and πG=0.9. The convergence factor is 1−0.01−0.09=0.9, and after 50 bits the gap has shrunk to 0.950=0.00515 of its starting size, so the channel forgets its initial state within a few dozen bits. The average bit error probability is
πGpG+πBpB=0.9×0.001+0.1×0.1=0.0109.
A bad spell lasts a random number of bits T. In each bad bit the chain leaves with probability g, so it stays at least k bits with probability (1−g)k−1. For a variable that takes positive whole-number values, E[T]=∑k≥1P(T≥k), because T equals the number of the indicators 1[T≥1],1[T≥2],… that are 1, and linearity of expectation turns the sum of indicators into the sum of their probabilities. Summing the geometric series, E[T]=∑k≥1(1−g)k−1=1/g=11.11 bits. A good spell lasts 1/b=100 bits on average.
The average error rate hides the clustering, and a two-bit statistic exposes it. The probability that two consecutive bits are both in error, in the long run, sums over the state of the first bit and the state it moves to,
A memoryless channel with the same average rate would give 0.01092=0.00011881, smaller by a factor of 7.68. Put another way, the probability that the bit after an error is also in error is 0.000912691/0.0109=0.0837, nearly eight times the average rate. Figure 8 shows what that looks like.
Figure 8. Errors in 2,000 bits from the Gilbert–Elliott channel in the state diagram above, top, with its bad spells shaded, and from BSC(0.0109), bottom, which has the same average error rate. Data: simulated with fixed seeds by ch03_charts.py in the companion repository.
Bursts defeat codes that assume independence. Send R3 with the three copies of each bit back to back, so that they share the channel's state. Summing over the eight possible state sequences of three consecutive bits, the probability that two or more copies are wrong is 0.0024927. If the copies are instead spread far apart, the chain forgets its state between them and the copies see nearly independent errors at rate q=0.0109, so the failure probability is 3q2−2q3=0.00035384, smaller by a factor of 7.04. Rearranging the order of transmitted bits so that the symbols of one codeword travel far apart is called interleaving, and it turns a bursty channel back into one that a code for independent errors can handle.
The bits of a memory do not travel anywhere, but they still pass through a channel, the interval between writing a word and reading it back. Four kinds of fault dominate, and each matches a channel model from this chapter.
A stuck-at fault is a cell or line that permanently reads 0, called stuck-at-0, or permanently reads 1, whatever is written. A stuck-at-0 cell is wrong only when a 1 is stored, and a write-and-read test can find it. Once located, its bit is no longer an unknown error but an erasure, a bit whose position is known and whose value is lost. Later chapters show that a code can fill twice as many erasures as it can correct unknown errors, which is why located faults are worth finding.
A single-event upset is a transient flip of one stored bit without damage to the cell. An alpha particle from trace radioactivity in the packaging [5], or a neutron from a cosmic-ray shower [6], deposits enough charge to flip a stored value, and rewriting the cell clears it. Each bit flips independently with a small probability, so a word between writes is a binary symmetric channel with a tiny p. A single-error-correcting code on a 72-bit word fails only when two bits flip before the word is rewritten. With an illustrative per-bit probability of 10−9 per interval, the union bound of Probability for Coding gives (272)×10−18=2556×10−18=2.556×10−15 per word, and across 230 words at most 2.744×10−6 expected failures per interval. Scrubbing, which reads every word on a schedule, corrects it and writes it back, keeps single upsets from accumulating into double ones.
A multi-bit upset is one strike that flips several neighboring cells at once, and Baumann's review describes how shrinking cells made such upsets more common [7]. It is a burst in space rather than in time, and the defense is the same interleaving. The bits of one logical word are placed in physically separated cells, so a strike that flips four neighbors flips one bit in each of four words, and each word's single-error correction handles its share.
Charge leakage is the Z-channel. A cell that stores a 1 as charge slowly loses it, and if the charge falls too far before the cell is refreshed, the 1 reads back as 0, while a stored 0 has no charge to lose. Refreshing on a schedule bounds how far the leak can go. Table 6 collects the four, and Figure 9 shows how they land on an array of cells.
Table 6. Memory faults and the channels that model them
Fault
Duration
Channel model
Usual response
Stuck-at
permanent
erasure, once located
test, then map out or fill as an erasure
Single-event upset
until rewritten
BSC with tiny p per interval
single-error correction and scrubbing
Multi-bit upset
until rewritten
burst of neighboring cells
interleave words across the array
Charge leakage
until refreshed
Z-channel
refresh on a schedule
Source: the fault descriptions in this section.
Figure 9. Faults on an interleaved memory array. Neighboring cells belong to different words, so the four-cell multi-bit upset flips one bit in each of words A, B, C and D, and a single-error-correcting code on each word repairs all four. The stuck-at cell fails on every write of the wrong value, and the single upset clears at the next rewrite.
This chapter measured a channel by how often it causes errors and how a receiver should weigh what it sees. The next chapter, Information and Entropy, measures a channel by how much it can carry. It defines the information in an outcome as its surprise, the base-2 logarithm of one over its probability, so that a fair coin flip carries one bit and a certain outcome carries none. Entropy, the average surprise, counts how many bits a source really produces, and mutual information measures how much the output of a noisy channel says about its input. The three channels of this chapter are its first examples, because an erasure tells the receiver nothing about the lost bit while a flip misleads it, and the two cost different amounts of capacity. MacKay [8] develops this view in depth, and Lin and Costello [9] treat these channel models at greater length.
[1]Grinstead, Charles M. and Snell, J. Laurie (2006). “Grinstead and Snell's Introduction to Probability.” The CHANCE Project. Version dated 4 July 2006 of the second edition published by the American Mathematical Society, free under the GNU Free Documentation License. https://math.dartmouth.edu/~prob/prob/prob.pdf
[2]North, D. O. (1963). “An Analysis of the Factors Which Determine Signal/Noise Discrimination in Pulsed-Carrier Systems.” Proceedings of the IEEE, 51(7), pp. 1016–1027. Reprint of RCA Laboratories Technical Report PTR-6C, 1943. doi:10.1109/PROC.1963.2383
[3]Gilbert, E. N. (1960). “Capacity of a Burst-Noise Channel.” Bell System Technical Journal, 39(5), pp. 1253–1265. doi:10.1002/j.1538-7305.1960.tb03959.x
[4]Elliott, E. O. (1963). “Estimates of Error Rates for Codes on Burst-Noise Channels.” Bell System Technical Journal, 42(5), pp. 1977–1997. doi:10.1002/j.1538-7305.1963.tb00955.x
[5]May, T. C. and Woods, M. H. (1979). “Alpha-Particle-Induced Soft Errors in Dynamic Memories.” IEEE Transactions on Electron Devices, 26(1), pp. 2–9. doi:10.1109/T-ED.1979.19370
[6]Ziegler, J. F. and Lanford, W. A. (1979). “Effect of Cosmic Rays on Computer Memories.” Science, 206(4420), pp. 776–788. doi:10.1126/science.206.4420.776
[7]Baumann, R. C. (2005). “Radiation-Induced Soft Errors in Advanced Semiconductor Technologies.” IEEE Transactions on Device and Materials Reliability, 5(3), pp. 305–316. doi:10.1109/TDMR.2005.853449
[8]MacKay, David J. C. (2003). “Information Theory, Inference, and Learning Algorithms.” Cambridge University Press. The author's site offers the whole book free to read on screen. https://www.inference.org.uk/itila/book.html
[9]Lin, Shu and Costello, Jr., Daniel J. (2004). “Error Control Coding: Fundamentals and Applications.” 2nd edition. Pearson Prentice Hall.
— Anirban
Hardware–software at the seam where compilers meet microcode.