Algorithm Search⌘K

Algorithmcore

Decision feedback equalizer

Also called DFE.

Cancels the postcursor ISI by subtracting a filtered copy of past decisions and handles the precursor ISI with a linear filter. With ideal feedback the MMSE design is one Wiener solve.

Time
O(N^2 (N + L) + K (N + L)) worst
Space
O(N (N + L)) extra
Where
K = the number of symbols; L = the number of channel taps; N = the number of feedforward taps
Properties
biaseddeterministicerror propagationnot linearneeds noise level
Origin
M. E. Austin, J. Salz, 1967

The decision feedback equalizer is a linear equalizer with a second filter that runs on the decisions. A channel hh of LL taps adds echoes of each symbol to the later samples (postcursor ISI) and, after a delay, to the earlier ones (precursor ISI). The feedforward filter cc works on the received samples and handles the precursors and the noise. The feedback filter bb works on the symbols already decided: it rebuilds their echoes and subtracts them before the slicer. These echoes are removed without any noise gain, which the linear MMSE equalizer and the zero-forcing equalizer cannot do. The cost is that a wrong decision feeds a wrong echo back, so errors come in bursts. The MMSE-DFE canonical theorem shows that the infinite-length MMSE-DFE with correct feedback loses no capacity. Tomlinson-Harashima precoding moves the feedback to the transmitter, where there are no wrong decisions. The Viterbi equalizer decides the whole sequence and has no error propagation, at a cost exponential in LL. The same idea on a channel matrix instead of a convolution is V-BLAST and successive interference cancellation.

In plain words

Each received sample contains the wanted symbol, echoes of older symbols and noise. A linear equalizer removes the echoes by filtering, and this also amplifies the noise. A DFE notices that the older symbols were already decided. If those decisions are right, the receiver knows the echoes exactly and can subtract them. Subtraction adds no noise. A short linear filter in front still handles the echoes of the symbols not yet decided. The weak point is a wrong decision: the receiver then subtracts the wrong echo, and the next decision is more likely to be wrong too.

The problem

The input is the channel h=(h0,…,hL−1)h = (h_0, \ldots, h_{L-1}), the noise power N0N_0, the symbol energy EsE_s, the alphabet, the filter lengths NfN_f and NbN_b, the delay Δ\Delta, and the received samples y[n]=∑lhl x[n−l]+w[n]y[n] = \sum_l h_l\, x[n-l] + w[n] at one sample per symbol, with independent symbols of mean zero and w[n]∼CN(0,N0)w[n] \sim \mathcal{CN}(0, N_0). The slicer input for the symbol x[n−Δ]x[n-\Delta] is

q[n]=∑i=0Nf−1ci y[n−i]−∑j=1Nbbj x^[n−Δ−j].q[n] = \sum_{i=0}^{N_f-1} c_i\, y[n-i] - \sum_{j=1}^{N_b} b_j\, \hat x[n-\Delta-j].

The design problem is to choose cc and bb to minimize J=E∣q[n]−x[n−Δ]∣2J = E|q[n] - x[n-\Delta]|^2, under the assumption that the past decisions x^\hat x are correct. The run then produces the decisions x^[0],x^[1],…\hat x[0], \hat x[1], \ldots one at a time.

The algorithm

Stack the samples in u=Hs+vu = Hs + v as for the linear equalizer, where HH is the Nf×(Nf+L−1)N_f \times (N_f + L - 1) convolution matrix with Hij=hj−iH_{ij} = h_{j-i}. With correct feedback, the symbols in the positions Δ+1,…,Δ+Nb\Delta + 1, \ldots, \Delta + N_b are known, so the feedforward filter does not need to fight them. The design removes their columns from HH and solves the Wiener problem against the rest. The feedback taps are then the postcursors of the combined response g=c∗hg = c * h.

  1. MMSE-DFE(h, Nf, Nb, Δ, N0, Es, y, K)
  2. 1H[i][j] ← h[j - i] for 0 ≤ i < Nf, 0 ≤ j < Nf + L - 1
  3. 2K ← the columns j of H with j ≤ Δ or j > Δ + Nb ▷ remove the fed-back symbols
  4. 3R ← Es H_K H_Kᴴ + N0 I
  5. 4r ← Es H e_Δ
  6. 5f ← R⁻¹ r; c ← conj(f) ▷ the feedforward taps
  7. 6J ← Es - rᴴ f ▷ the error with correct feedback
  8. 7g ← c * h ▷ the combined response
  9. 8b[j] ← g[Δ + j] for j = 1 .. Nb ▷ the feedback taps
  10. 9for k ← 0 to K - 1
  11. 10z ← Σ_i c[i] y[k + Δ - i]
  12. 11q ← z - Σ_j b[j] x̂[k - j] ▷ subtract the known echoes
  13. 12x̂[k] ← the alphabet point nearest to q / (1 - J/Es)
  14. 13return x̂

Lines L1 to L8 run once per channel. Line L5 is one Hermitian positive definite solve. Line L8 makes the feedback cancel exactly the postcursors gΔ+1,…,gΔ+Nbg_{\Delta+1}, \ldots, g_{\Delta+N_b} that the feedforward filter leaves. Lines L9 to L12 run once per symbol. Line L12 divides by the bias 1−J/Es1 - J/E_s: the MMSE output is a shrunk copy of the symbol, which matters for QAM and PAM but not for BPSK or PSK. The ZF-DFE is the limit N0→0N_0 \to 0. For h0≠0h_0 \ne 0 it can take Nf=1N_f = 1, c0=1/h0c_0 = 1/h_0 and bj=hj/h0b_j = h_j/h_0.

Example

Take h=(1,0.5)h = (1, 0.5), Es=1E_s = 1 and N0=0.1N_0 = 0.1 (10 dB). With Nf=5N_f = 5 and Nb=1N_b = 1, the error for each delay is:

Δ\Delta 0 1 2 3 4 5
JJ 0.090909 0.089069 0.088705 0.088634 0.088620 0.778511

At Δ=5\Delta = 5 the only postcursor is outside the filter span, so the feedback has nothing to cancel. The best delay is 4, with the feedforward taps c=(−0.00353,0.00952,−0.02218,0.05036,0.88620)c = (-0.00353, 0.00952, -0.02218, 0.05036, 0.88620) and the feedback tap b1=0.44310b_1 = 0.44310. The cursor of g=c∗hg = c * h is g4=0.91138=1−Jg_4 = 0.91138 = 1 - J. The unbiased SNR is 1/J−1=10.281/J - 1 = 10.28, or 10.12 dB. For comparison, at the same SNR on the same channel:

receiver SNR at the slicer
infinite-length linear MMSE 9.07 dB
ZF-DFE, c0=1c_0 = 1, b1=0.5b_1 = 0.5 10.00 dB
MMSE-DFE, Nf=5N_f = 5, Nb=1N_b = 1 10.12 dB
infinite-length MMSE-DFE 10.12 dB
matched filter bound, ∥h∥2Es/N0\|h\|^2 E_s / N_0 10.97 dB

The infinite-length value is J∞=N0/GJ_\infty = N_0 / G, where G=(1.35+1.352−1)/2=1.12846G = (1.35 + \sqrt{1.35^2 - 1})/2 = 1.12846 is the geometric mean of ∣H(ejω)∣2+N0/Es=1.35+cos⁡ω|H(e^{j\omega})|^2 + N_0/E_s = 1.35 + \cos\omega. This gives J∞=0.088616J_\infty = 0.088616. The DFE gains 1 dB over the linear equalizer here. On the channel B of Proakis, h=(0.407,0.815,0.407)h = (0.407, 0.815, 0.407) at 20 dB, an MMSE-DFE with Nf=11N_f = 11 and Nb=2N_b = 2 reaches J=0.02968J = 0.02968, an unbiased SNR of 15.14 dB, against 6.60 dB for a 31-tap linear MMSE equalizer. That channel has a spectral null, which hurts every linear equalizer.

Error propagation. Run the ZF-DFE on h=(1,0.5)h = (1, 0.5) with BPSK and the noise w=(0,−1.6,0.1,0.2,0)w = (0, -1.6, 0.1, 0.2, 0):

kk 0 1 2 3 4
x[k]x[k] 1 1 -1 -1 1
y[k]y[k] 1.0 -0.1 -0.4 -1.3 0.5
q=y[k]−0.5 x^[k−1]q = y[k] - 0.5\, \hat x[k-1] 1.0 -0.6 0.1 -1.8 1.0
x^[k]\hat x[k] 1 -1 1 -1 1

The large noise sample at k=1k = 1 causes the first error. The wrong feedback at k=2k = 2 adds −0.5×(−1−1)=1-0.5 \times (-1 - 1) = 1 to qq, which turns a correct decision into a second error. With correct feedback, qq at k=2k = 2 would be −0.9-0.9. At k=3k = 3 the error happens to push qq the right way, and the burst ends. In a simulation of 40000 symbols at N0=0.3N_0 = 0.3 (seed 7206), this receiver made 201 errors with ideal feedback, close to 40000 Q(2/N0)=196.540000\, Q(\sqrt{2/N_0}) = 196.5, and 257 errors with its own decisions. On h=(1,0.9)h = (1, 0.9) the ratio grows to about 1.9 (195 against 375, seed 7207).

Correctness

Claim. If the past decisions are correct, lines L5 and L8 give the unique taps that minimize JJ, the minimum is line L6, and the cursor is gΔ=1−J/Esg_\Delta = 1 - J/E_s. With Nb=0N_b = 0 the design is the linear MMSE equalizer, and more feedback taps never increase JJ.

Key step. With correct feedback, the error is Es∑j∉B∣gj−[j=Δ]∣2+Es∑t∣gΔ+t−bt∣2+N0∥c∥2E_s \sum_{j \notin B} |g_j - [j = \Delta]|^2 + E_s \sum_t |g_{\Delta+t} - b_t|^2 + N_0 \|c\|^2, where BB holds the feedback positions. The feedback taps appear only in the middle sum, which is zero for bt=gΔ+tb_t = g_{\Delta+t}. What remains is a Wiener problem for ff against the regressor with the columns BB removed, which completing the square solves. Without noise and with a small residual ISI, an induction on kk shows that every decision is correct, so the assumption holds. With noise, a burst of errors ends after NbN_b correct decisions in a row. The proofs folder has the details.

Proof: With ideal feedback, the MMSE-DFE feedback taps are the postcursors of the combined response and the feedforward taps solve a Wiener problem with the feedback columns removedfull

The channel taps are h0,…,hL−1h_0, \ldots, h_{L-1}, not all zero. The received samples are y[n]=∑lhl x[n−l]+w[n]y[n] = \sum_l h_l\, x[n-l] + w[n], where the symbols x[n]x[n] are independent with mean zero and E∣x[n]∣2=EsE|x[n]|^2 = E_s, and the noise samples w[n]∼CN(0,N0)w[n] \sim \mathcal{CN}(0, N_0) are independent of each other and of the symbols. The feedforward filter has the taps c0,…,cNf−1c_0, \ldots, c_{N_f-1} and the output z[n]=∑ici y[n−i]z[n] = \sum_i c_i\, y[n-i]. The feedback filter has the taps b1,…,bNbb_1, \ldots, b_{N_b}. The slicer input for the symbol x[n−Δ]x[n - \Delta] is

q[n]=z[n]−∑j=1Nbbj x^[n−Δ−j],q[n] = z[n] - \sum_{j=1}^{N_b} b_j\, \hat x[n - \Delta - j],

and the decision is the alphabet point nearest to q[n]/γq[n] / \gamma for a fixed gain γ>0\gamma > 0 (lines L9 to L12).

Let u=(y[n],…,y[n−Nf+1])Tu = (y[n], \ldots, y[n-N_f+1])^T and s=(x[n],…,x[n−Nf−L+2])Ts = (x[n], \ldots, x[n - N_f - L + 2])^T. As for the linear equalizer, u=Hs+vu = Hs + v with the Nf×(Nf+L−1)N_f \times (N_f + L - 1) matrix Hij=hj−iH_{ij} = h_{j-i} (line L1) and the noise vector vv, with E[ssH]=EsIE[ss^H] = E_s I, E[vvH]=N0IE[vv^H] = N_0 I and E[svH]=0E[sv^H] = 0. Write f=cˉf = \bar c, so z[n]=fHuz[n] = f^H u, and g=c∗hg = c * h, so gj=∑icihj−ig_j = \sum_i c_i h_{j-i} is the gain from x[n−j]x[n-j] to z[n]z[n]. Let B={Δ+1,…,Δ+Nb}B = \{\Delta + 1, \ldots, \Delta + N_b\} be the feedback positions and KK the other column indices (line L2). Entries of gg at indices past its end are 0.

Ideal feedback means x^[n−Δ−j]=x[n−Δ−j]\hat x[n - \Delta - j] = x[n - \Delta - j] for j=1,…,Nbj = 1, \ldots, N_b. The design (lines L1 to L8) assumes it. Theorem 3 says when the decisions are in fact correct.

Lemma 1 (the error of any taps). With ideal feedback, for every cc and bb,

J(c,b)=E∣q[n]−x[n−Δ]∣2=Es∑j∈K∣gj−[j=Δ]∣2+Es∑t=1Nb∣gΔ+t−bt∣2+N0∥c∥2.J(c, b) = E|q[n] - x[n-\Delta]|^2 = E_s \sum_{j \in K} |g_j - [j = \Delta]|^2 + E_s \sum_{t=1}^{N_b} |g_{\Delta+t} - b_t|^2 + N_0 \|c\|^2 .

Proof. q[n]−x[n−Δ]=∑j(gj−[j=Δ]−[j∈B] bj−Δ) x[n−j]+∑ici w[n−i]q[n] - x[n-\Delta] = \sum_j (g_j - [j = \Delta] - [j \in B]\, b_{j - \Delta})\, x[n-j] + \sum_i c_i\, w[n-i]. The terms are independent with mean zero, so the variances add. □\square

Lemma 2 (the best feedback for fixed feedforward taps). For a fixed cc, the unique minimizer of J(c,⋅)J(c, \cdot) is bt=gΔ+tb_t = g_{\Delta+t} for t=1,…,Nbt = 1, \ldots, N_b, and then

J(c,b)=E∣fHuK−x[n−Δ]∣2,J(c, b) = E|f^H u_K - x[n - \Delta]|^2,

where uK=HKsK+vu_K = H_K s_K + v, with HKH_K the columns of HH in KK and sKs_K the entries of ss in KK.

Proof. In Lemma 1, bb appears only in the middle sum, which is zero exactly when bt=gΔ+tb_t = g_{\Delta+t} for every tt. The remaining two terms are the error of the filter ff against the regressor uKu_K by the same computation as Lemma 1, because fHHKsK=∑j∈Kgjx[n−j]f^H H_K s_K = \sum_{j \in K} g_j x[n-j]. □\square

Lemma 3 (R is positive definite). R=EsHKHKH+N0IR = E_s H_K H_K^H + N_0 I (line L3) is Hermitian, and it is positive definite if N0>0N_0 > 0.

Proof. For a≠0a \ne 0, aHRa=Es∥HKHa∥2+N0∥a∥2>0a^H R a = E_s \|H_K^H a\|^2 + N_0 \|a\|^2 > 0. □\square

If N0=0N_0 = 0, RR can be singular, because removing the columns BB can make the rows of HKH_K dependent. The implementation then raises an error.

Theorem 1 (the MMSE-DFE). Let r=EsHeΔr = E_s H e_\Delta (line L4). Since Δ∈K\Delta \in K, r=EsHKeΔ′r = E_s H_K e'_\Delta for the matching unit vector eΔ′e'_\Delta, so r=E[uK x[n−Δ]‾]r = E[u_K\, \overline{x[n-\Delta]}]. If RR is positive definite, the taps c=fˉc = \bar f with Rf=rR f = r (line L5) and bt=gΔ+tb_t = g_{\Delta + t} (lines L7 and L8) are the unique joint minimizer of J(c,b)J(c, b), and the minimum is J=Es−rHfJ = E_s - r^H f (line L6).

Proof. By Lemma 2, min⁡c,bJ(c,b)=min⁡fE∣fHuK−x[n−Δ]∣2\min_{c, b} J(c, b) = \min_f E|f^H u_K - x[n-\Delta]|^2, and the minimizing bb is unique for each cc. The right side is a Wiener problem with the covariance E[uKuKH]=RE[u_K u_K^H] = R and the cross-correlation rr. Expanding it gives fHRf−2 Re(fHr)+Esf^H R f - 2\,\mathrm{Re}(f^H r) + E_s, and completing the square gives

Es−rHR−1r+(f−R−1r)HR (f−R−1r).E_s - r^H R^{-1} r + (f - R^{-1} r)^H R\, (f - R^{-1} r).

The last term is positive for f≠R−1rf \ne R^{-1} r because RR is positive definite. So f=R−1rf = R^{-1} r is the unique minimizer, with the value Es−rHfE_s - r^H f. □\square

Corollary 1 (the bias). The cursor of the combined response is gΔ=1−J/Esg_\Delta = 1 - J/E_s, a real number in (0,1](0, 1] when N0>0N_0 > 0.

Proof. gΔ=∑icihΔ−i=fHHeΔ=fHr/Es=rHR−1r/Esg_\Delta = \sum_i c_i h_{\Delta - i} = f^H H e_\Delta = f^H r / E_s = r^H R^{-1} r / E_s, which is real and nonnegative. By Theorem 1 it equals (Es−J)/Es(E_s - J)/E_s. J>0J > 0 when N0>0N_0 > 0 because N0∥c∥2>0N_0 \|c\|^2 > 0 unless c=0c = 0, and c=0c = 0 gives J=EsJ = E_s. □\square

So with ideal feedback q[n]=(1−J/Es) x[n−Δ]+e′[n]q[n] = (1 - J/E_s)\, x[n - \Delta] + e'[n], where e′[n]e'[n] has mean zero and is uncorrelated with x[n−Δ]x[n - \Delta], by the orthogonality of the Wiener error. Line L12 divides by γ=1−J/Es\gamma = 1 - J/E_s before the slicer.

Corollary 2 (more feedback taps never hurt). For fixed NfN_f and Δ\Delta, the minimum JJ does not increase with NbN_b. In particular, with Nb=0N_b = 0 it is the error of the linear MMSE equalizer, so the MMSE-DFE with ideal feedback is never worse than the linear MMSE equalizer of the same length.

Proof. A DFE with NbN_b taps and bNb=0b_{N_b} = 0 is a DFE with Nb−1N_b - 1 taps. So the set over which Theorem 1 minimizes grows with NbN_b. □\square

Theorem 2 (the zero-forcing DFE). If h0≠0h_0 \ne 0, Nf=1N_f = 1, Δ=0\Delta = 0 and Nb≥L−1N_b \ge L - 1, the taps c0=1/h0c_0 = 1/h_0 and bt=ht/h0b_t = h_t / h_0 remove all ISI, and the error is N0/∣h0∣2N_0 / |h_0|^2.

Proof. g=h/h0g = h / h_0, so g0=1g_0 = 1, and bt=gtb_t = g_t cancels every postcursor in Lemma 1. The only term left is N0∣c0∣2N_0 |c_0|^2. □\square

Theorem 3 (no error propagation without noise). Let dmin⁡d_{\min} be the minimum distance of the alphabet, A=max⁡∣a∣A = \max |a| over the alphabet, and let the taps satisfy γ>0\gamma > 0 and

ρ=A∑j∈K, j≠Δ∣gj∣+A∑t=1Nb∣gΔ+t−bt∣<γ dmin⁡2−A ∣gΔ−γ∣.\rho = A \sum_{j \in K,\, j \ne \Delta} |g_j| + A \sum_{t=1}^{N_b} |g_{\Delta+t} - b_t| < \gamma\, \frac{d_{\min}}{2} - A\, |g_\Delta - \gamma| .

If w=0w = 0 and the symbols before x[0]x[0] are 0 in both the channel and the run, then line L12 decides every symbol correctly.

Proof. By induction on kk. Assume x^[i]=x[i]\hat x[i] = x[i] for all i<ki < k. Then the feedback at step kk equals the ideal feedback, and by the computation of Lemma 1 with w=0w = 0, q−γx[k]=(gΔ−γ)x[k]+∑j∈K,j≠Δgjx[k+Δ−j]+∑t(gΔ+t−bt) x[k−t]q - \gamma x[k] = (g_\Delta - \gamma) x[k] + \sum_{j \in K, j \ne \Delta} g_j x[k + \Delta - j] + \sum_t (g_{\Delta+t} - b_t)\, x[k - t]. Its modulus is at most A∣gΔ−γ∣+ρ<γdmin⁡/2A |g_\Delta - \gamma| + \rho < \gamma d_{\min}/2. So ∣q/γ−x[k]∣<dmin⁡/2|q/\gamma - x[k]| < d_{\min}/2, and x[k]x[k] is the unique nearest point. □\square

For the MMSE taps with γ=1−J/Es\gamma = 1 - J/E_s, the term ∣gΔ−γ∣|g_\Delta - \gamma| is 0 by Corollary 1 and the second sum is 0 by Theorem 1. The condition then asks only that the residual precursor and far postcursor ISI is small, which holds for long filters at high SNR.

Corollary 3 (recovery after errors). Assume the condition of Theorem 3, let μ=γdmin⁡/2−A∣gΔ−γ∣−ρ>0\mu = \gamma d_{\min}/2 - A|g_\Delta - \gamma| - \rho > 0 be the margin, and let the noise term ∑iciw[k+Δ−i]\sum_i c_i w[k + \Delta - i] have modulus less than μ\mu from step kk on. If the NbN_b decisions before step kk are correct, every decision from step kk on is correct.

Proof. The induction step of Theorem 3 uses only the NbN_b decisions before the current step, because the feedforward filter does not use decisions. With the noise term added, the bound on ∣q−γx[k]∣|q - \gamma x[k]| becomes less than A∣gΔ−γ∣+ρ+μ=γdmin⁡/2A|g_\Delta - \gamma| + \rho + \mu = \gamma d_{\min}/2, and the induction goes through. □\square

So a wrong decision enters the next NbN_b slicer inputs with the weights btb_t and can cause more errors, but the burst ends after NbN_b correct decisions in a row when the noise is small.

The size of the error bursts with noise is a property of the channel and the SNR. The page gives a measurement, not a bound.

Complexity

The design costs O(Nf2(Nf+L))O(N_f^2 (N_f + L)) for RR and O(Nf3)O(N_f^3) for the solve. RR is a Toeplitz matrix minus a matrix of rank NbN_b, so fast solvers exist, but the direct solve is cheap for the usual lengths. The run costs Nf+NbN_f + N_b complex multiplications per symbol. With Nb≤L−1N_b \le L - 1, KK symbols cost O(N2(N+L)+K(N+L))O(N^2 (N + L) + K (N + L)) in the real RAM with N=NfN = N_f, and the extra space is O(N(N+L))O(N (N + L)) for HH and RR.

Properties

  • No noise gain for the postcursors. The feedback removes the echoes of past symbols by subtraction, so on a minimum-phase channel the ZF-DFE needs only one feedforward tap and has the noise gain 1/∣h0∣21/|h_0|^2. On h=(1,0.5)h = (1, 0.5) this is 1, against 1.333 for the linear ZF equalizer.
  • Nonlinear. The slicer is inside the loop, so the DFE is not a linear filter, and its BER is not a function of JJ alone.
  • Error propagation. A wrong decision makes the next NbN_b slicer inputs worse. This is a measurement for each channel; no simple closed form gives the BER.
  • Biased. With correct feedback, q[n]=(1−J/Es) x[n−Δ]q[n] = (1 - J/E_s)\, x[n-\Delta] plus an uncorrelated error. The unbiased SNR is Es/J−1E_s/J - 1.
  • Optimal with ideal feedback in the limit. The infinite-length MMSE-DFE has J∞=N0/exp⁡(12π∫ln⁡(∣H(ejω)∣2+N0/Es) dω)J_\infty = N_0 / \exp\big(\frac{1}{2\pi}\int \ln(|H(e^{j\omega})|^2 + N_0/E_s)\, d\omega\big), and its unbiased SNR gives the mutual information of the channel with Gaussian inputs; see the MMSE-DFE canonical theorem.
  • Causality. The feedback can only use decided symbols, so the precursor ISI must be handled by the feedforward filter. A channel with strong precursors needs a long feedforward filter and a large delay.

Variants and improvements

  • ZF-DFE. The limit N0→0N_0 \to 0. It is simpler and needs no noise estimate, but it enhances noise from the precursors.
  • Adaptive DFE. Both filters adapt with the LMS algorithm or the RLS algorithm, with the decisions as the reference; see adaptive equalization.
  • Fractionally spaced feedforward filter. A fractionally spaced feedforward filter makes the DFE insensitive to the sampling phase.
  • Precoding. Tomlinson-Harashima precoding runs the feedback filter at the transmitter with a modulo operation, so there is no error propagation and coding works as on an ISI-free channel.
  • Sequence estimation with feedback. Reduced-state sequence estimation keeps a short trellis for the first taps and uses feedback per survivor for the rest; it lies between the DFE and the Viterbi equalizer.
  • Soft feedback. In turbo equalization, the soft interference cancellation equalizer subtracts the mean of each symbol from a decoder instead of a hard decision.

When to use it

Use a DFE when the channel has strong postcursors or spectral nulls and a linear equalizer loses too much SNR, but the Viterbi equalizer is too expensive because LL or the alphabet is large. It was the standard receiver of voiceband modems and is common in high-speed serial links. When the code needs reliable symbols before decoding, or when error propagation is too costly, move the feedback to the transmitter with precoding, or iterate with the decoder.

Pitfalls

  • Designing with real decisions in mind. The MMSE formulas assume correct feedback. Measure the BER of the real loop, and compare it with a run that feeds back the true symbols to separate error propagation from the noise.
  • The wrong delay. On h=(1,0.5)h = (1, 0.5) with Nf=5N_f = 5 and Nb=1N_b = 1, the error is 0.0886 at Δ=4\Delta = 4 and 0.7785 at Δ=5\Delta = 5, where the feedback is outside the span. Keep Δ≤Nf−1\Delta \le N_f - 1 and search over the delays.
  • Feedback indexing. b1b_1 multiplies the decision just before the current one. An off-by-one shift subtracts the wrong echo on every symbol, and the loop can still look stable at high SNR.
  • The bias with multilevel alphabets. For 16-QAM or 4-PAM, slice q/(1−J/Es)q / (1 - J/E_s). Without the scaling, the outer points fall short.
  • Startup. Before the first decision, the feedback has no history. Start with a known preamble, or treat the symbols before the block as known zeros, as the implementation does.
  • Coding. A decoder needs soft values for all symbols of a block, but the DFE needs hard decisions now. Tentative decisions from the slicer are less reliable than the decoded symbols, which is a reason for precoding.

Implementations

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

cbb.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Shared helper of the communications pages of https://algorithm.tamnd.com/. The authors are listed in prov/.

"""Complex baseband tools for the communications pages.

Vectors are lists of complex numbers. Matrices are lists of rows. The
functions here are plain building blocks: small linear algebra, convolution,
the DFT as a direct sum, the Gaussian Q function, dB conversion, complex
Gaussian noise and the Wilson score interval. No page algorithm (equalizer,
estimator, synchronizer, detector, precoder, demapper or power allocation)
lives in this file.

Conventions (prompts of the communications area):
- dft is X[k] = sum_n x[n] e^(-j 2 pi k n / N) with no factor; idft has 1/N.
- udft and uidft are the unitary pair, with 1/sqrt(N) on both sides.
- qfunc(x) = 0.5 erfc(x / sqrt(2)); it never computes 1 - Phi(x).
- cn(rng, var) draws CN(0, var): real and imaginary parts are independent
  with variance var / 2 each, so E|w|^2 = var.
"""

import cmath
import math
import random


# ---------------------------------------------------------------- vectors and matrices


def zeros(rows: int, cols: int | None = None) -> list:
    """A zero vector of length rows, or a rows by cols zero matrix."""
    if cols is None:
        return [0j] * rows
    return [[0j] * cols for _ in range(rows)]


def eye(n: int) -> list[list[complex]]:
    """The n by n identity matrix."""
    return [[1 + 0j if i == k else 0j for k in range(n)] for i in range(n)]


def add(a: list, b: list) -> list:
    """Elementwise a + b for two vectors or two matrices of the same shape."""
    if len(a) != len(b):
        raise ValueError("shapes differ")
    if a and isinstance(a[0], list):
        return [add(r, s) for r, s in zip(a, b)]
    return [x + y for x, y in zip(a, b)]


def sub(a: list, b: list) -> list:
    """Elementwise a - b for two vectors or two matrices of the same shape."""
    if len(a) != len(b):
        raise ValueError("shapes differ")
    if a and isinstance(a[0], list):
        return [sub(r, s) for r, s in zip(a, b)]
    return [x - y for x, y in zip(a, b)]


def scale(c: complex, a: list) -> list:
    """The scalar c times a vector or a matrix."""
    if a and isinstance(a[0], list):
        return [scale(c, r) for r in a]
    return [c * x for x in a]


def matmul(a: list[list[complex]], b: list[list[complex]]) -> list[list[complex]]:
    """The matrix product a b."""
    if not a or not b or len(a[0]) != len(b):
        raise ValueError("inner dimensions differ")
    cols = list(zip(*b))
    return [[sum(x * y for x, y in zip(row, col)) for col in cols] for row in a]


def matvec(a: list[list[complex]], x: list[complex]) -> list[complex]:
    """The matrix times vector product a x."""
    if a and len(a[0]) != len(x):
        raise ValueError("inner dimensions differ")
    return [sum(p * q for p, q in zip(row, x)) for row in a]


def herm(a: list) -> list:
    """The conjugate transpose of a matrix. A vector gives its conjugate."""
    if a and isinstance(a[0], list):
        return [[complex(a[i][k]).conjugate() for i in range(len(a))] for k in range(len(a[0]))]
    return [complex(x).conjugate() for x in a]


def dot(x: list[complex], y: list[complex]) -> complex:
    """The inner product x^H y = sum of conj(x_i) y_i."""
    if len(x) != len(y):
        raise ValueError("lengths differ")
    return sum(complex(p).conjugate() * q for p, q in zip(x, y))


def norm2(x: list) -> float:
    """The squared Euclidean norm sum |x_i|^2 (squared Frobenius norm for a matrix)."""
    if x and isinstance(x[0], list):
        return sum(norm2(r) for r in x)
    return sum(abs(v) ** 2 for v in x)


# ---------------------------------------------------------------- linear systems


def _lu(a: list[list[complex]]) -> tuple[list[list[complex]], list[int], int]:
    """LU factorization with partial pivoting. Returns (lu, perm, sign)."""
    n = len(a)
    if any(len(r) != n for r in a):
        raise ValueError("matrix is not square")
    m = [[complex(v) for v in r] for r in a]
    perm = list(range(n))
    sign = 1
    for k in range(n):
        p = max(range(k, n), key=lambda i: abs(m[i][k]))
        if abs(m[p][k]) == 0.0:
            raise ValueError("matrix is singular")
        if p != k:
            m[k], m[p] = m[p], m[k]
            perm[k], perm[p] = perm[p], perm[k]
            sign = -sign
        for i in range(k + 1, n):
            f = m[i][k] / m[k][k]
            m[i][k] = f
            if f != 0:
                rk, ri = m[k], m[i]
                for c in range(k + 1, n):
                    ri[c] -= f * rk[c]
    return m, perm, sign


def _lu_solve(lu: list[list[complex]], perm: list[int], b: list[complex]) -> list[complex]:
    n = len(lu)
    y = [complex(b[perm[i]]) for i in range(n)]
    for i in range(n):
        for c in range(i):
            y[i] -= lu[i][c] * y[c]
    for i in range(n - 1, -1, -1):
        for c in range(i + 1, n):
            y[i] -= lu[i][c] * y[c]
        y[i] /= lu[i][i]
    return y


def solve(a: list[list[complex]], b: list) -> list:
    """Solve a x = b by Gaussian elimination with partial pivoting.

    b is a vector, or a matrix whose columns are right-hand sides.
    Raises ValueError if a is singular.
    """
    lu, perm, _ = _lu(a)
    if b and isinstance(b[0], list):
        cols = [list(c) for c in zip(*b)]
        xs = [_lu_solve(lu, perm, c) for c in cols]
        return [list(r) for r in zip(*xs)]
    if len(b) != len(a):
        raise ValueError("lengths differ")
    return _lu_solve(lu, perm, b)


def inv(a: list[list[complex]]) -> list[list[complex]]:
    """The inverse of a square matrix."""
    return solve(a, eye(len(a)))


def det(a: list[list[complex]]) -> complex:
    """The determinant of a square matrix (0 for a singular matrix)."""
    try:
        lu, _, sign = _lu(a)
    except ValueError as e:
        if "singular" in str(e):
            return 0j
        raise
    d = complex(sign)
    for i in range(len(lu)):
        d *= lu[i][i]
    return d


def cholesky(a: list[list[complex]]) -> list[list[complex]]:
    """The lower triangular L with a = L L^H, for a Hermitian positive definite a.

    Raises ValueError if a is not positive definite (to rounding).
    """
    n = len(a)
    low = zeros(n, n)
    for i in range(n):
        for k in range(i + 1):
            s = complex(a[i][k]) - sum(low[i][c] * low[k][c].conjugate() for c in range(k))
            if i == k:
                if s.real <= 0.0:
                    raise ValueError("matrix is not positive definite")
                low[i][i] = complex(math.sqrt(s.real))
            else:
                low[i][k] = s / low[k][k].real
    return low


# ---------------------------------------------------------------- convolution and the DFT


def conv(a: list[complex], b: list[complex]) -> list[complex]:
    """Linear convolution, of length len(a) + len(b) - 1."""
    if not a or not b:
        return []
    out = [0j] * (len(a) + len(b) - 1)
    for i, x in enumerate(a):
        for k, y in enumerate(b):
            out[i + k] += x * y
    return out


def cconv(a: list[complex], b: list[complex], n: int | None = None) -> list[complex]:
    """Circular convolution of length n (default: the longer length).

    Both inputs are padded with zeros to length n, or must not be longer than n.
    """
    if n is None:
        n = max(len(a), len(b))
    if len(a) > n or len(b) > n:
        raise ValueError("input longer than n")
    out = [0j] * n
    for i, x in enumerate(a):
        for k, y in enumerate(b):
            out[(i + k) % n] += x * y
    return out


def _twiddles(n: int, sign: int) -> list[complex]:
    return [cmath.exp(sign * 2j * math.pi * t / n) for t in range(n)]


def dft(x: list[complex]) -> list[complex]:
    """X[k] = sum over n of x[n] e^(-j 2 pi k n / N), as a direct O(N^2) sum."""
    n = len(x)
    w = _twiddles(n, -1)
    return [sum(x[t] * w[(k * t) % n] for t in range(n)) for k in range(n)]


def idft(xf: list[complex]) -> list[complex]:
    """x[n] = (1/N) sum over k of X[k] e^(j 2 pi k n / N), the inverse of dft."""
    n = len(xf)
    w = _twiddles(n, 1)
    return [sum(xf[k] * w[(k * t) % n] for k in range(n)) / n for t in range(n)]


def udft(x: list[complex]) -> list[complex]:
    """The unitary DFT: dft(x) / sqrt(N)."""
    s = 1.0 / math.sqrt(len(x)) if x else 1.0
    return [v * s for v in dft(x)]


def uidft(xf: list[complex]) -> list[complex]:
    """The unitary inverse DFT: sqrt(N) idft(X), the inverse of udft."""
    s = math.sqrt(len(xf)) if xf else 1.0
    return [v * s for v in idft(xf)]


# ---------------------------------------------------------------- Q function and dB


def qfunc(x: float) -> float:
    """Q(x) = P(Z > x) for a standard normal Z, computed as 0.5 erfc(x / sqrt(2))."""
    return 0.5 * math.erfc(x / math.sqrt(2.0))


def qinv(p: float) -> float:
    """The x with Q(x) = p, for 0 < p < 1, by bisection on Q (which decreases)."""
    if not 0.0 < p < 1.0:
        raise ValueError("p must be in (0, 1)")
    lo, hi = -40.0, 40.0
    for _ in range(200):
        mid = 0.5 * (lo + hi)
        if qfunc(mid) > p:
            lo = mid
        else:
            hi = mid
        if hi - lo <= 1e-15 * max(1.0, abs(mid)):
            break
    return 0.5 * (lo + hi)


def db(x: float) -> float:
    """10 log10(x), for a ratio of powers or energies."""
    return 10.0 * math.log10(x)


def undb(d: float) -> float:
    """10^(d / 10), the inverse of db."""
    return 10.0 ** (d / 10.0)


# ---------------------------------------------------------------- noise and statistics


def cn(rng: random.Random, var: float) -> complex:
    """One sample of CN(0, var): independent real and imaginary parts of variance var / 2."""
    s = math.sqrt(var / 2.0)
    return complex(rng.gauss(0.0, s), rng.gauss(0.0, s))


def awgn(rng: random.Random, x: list[complex], n0: float) -> list[complex]:
    """x plus independent CN(0, n0) noise on each sample."""
    return [v + cn(rng, n0) for v in x]


def wilson(k: int, n: int, z: float = 3.29) -> tuple[float, float]:
    """The Wilson score interval for k successes in n trials (z = 3.29 is about 0.999 two-sided)."""
    if n <= 0 or not 0 <= k <= n:
        raise ValueError("need 0 <= k <= n and n > 0")
    p = k / n
    z2 = z * z
    den = 1.0 + z2 / n
    mid = (p + z2 / (2 * n)) / den
    half = z * math.sqrt(p * (1 - p) / n + z2 / (4 * n * n)) / den
    return max(0.0, mid - half), min(1.0, mid + half)
decision_feedback_equalizer.py 109 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/decision-feedback-equalizer/. The authors are listed in prov/K3EMZX.jsonl.

"""The finite-length MMSE decision feedback equalizer.

The channel is y[k] = sum_{l=0}^{L-1} h[l] x[k-l] + w[k] at one sample per
symbol, with independent symbols of mean zero and E|x|^2 = Es, and noise
CN(0, N0). The feedforward filter c has Nf taps and its output
z[k] = sum_i c[i] y[k-i] estimates x[k - D]. The feedback filter b has Nb taps
and subtracts sum_j b[j] xhat[k - D - j], j = 1..Nb, built from past decisions.

The design assumes correct past decisions (ideal feedback). With the regressor
u = H s + w, H[i][j] = h[j - i], the feedback removes the columns D + 1, ...,
D + Nb of H. The feedforward taps are the Wiener solution against the rest:
R f = r with R = Es H_K H_K^H + N0 I and r = Es H e_D, c = conj(f). The
feedback taps are the postcursors of the combined response g = c * h:
b[j] = g[D + j]. The minimum mean squared error is J = Es - r^H f.
"""

import cbb


def channel_matrix(h: list[complex], nf: int) -> list[list[complex]]:
    """The Nf by Nf + L - 1 matrix H with H[i][j] = h[j - i]."""
    taps = len(h)
    if taps < 1 or nf < 1:
        raise ValueError("need L >= 1 and Nf >= 1")
    return [[complex(h[j - i]) if 0 <= j - i < taps else 0j for j in range(nf + taps - 1)] for i in range(nf)]


def dfe_design(h: list[complex], nf: int, nb: int, delay: int, n0: float, es: float = 1.0) -> tuple[list[complex], list[complex], float]:
    """The MMSE-DFE taps (c, b) and the mean squared error J, under ideal feedback.

    b[0] is the tap of the decision xhat[k - D - 1], b[1] that of xhat[k - D - 2], and so on.
    """
    if n0 < 0 or es <= 0 or nb < 0:
        raise ValueError("need N0 >= 0, Es > 0 and Nb >= 0")
    if not 0 <= delay <= nf + len(h) - 2:
        raise ValueError("need 0 <= delay <= Nf + L - 2")
    hm = channel_matrix(h, nf)  # @line L1
    m = len(hm[0])
    keep = [j for j in range(m) if not delay < j <= delay + nb]  # @line L2
    big_r = [[es * sum(hm[i][t] * hm[k][t].conjugate() for t in keep) + (n0 if i == k else 0) for k in range(nf)] for i in range(nf)]  # @line L3
    r = [es * hm[i][delay] for i in range(nf)]  # @line L4
    try:
        f = cbb.solve(big_r, r)  # @line L5
    except ValueError:
        raise ValueError("R is singular: N0 = 0 and the kept columns of H do not span") from None
    c = [v.conjugate() for v in f]
    j = es - cbb.dot(r, f).real  # @line L6
    g = cbb.conv(c, [complex(v) for v in h])  # @line L7
    b = [g[delay + t] if delay + t < len(g) else 0j for t in range(1, nb + 1)]
    return c, b, j  # @line L8


def combined_response(c: list[complex], h: list[complex]) -> list[complex]:
    """g = c * h, the response from the symbols to the feedforward output."""
    return cbb.conv(c, [complex(v) for v in h])


def mse(c: list[complex], b: list[complex], h: list[complex], delay: int, n0: float, es: float = 1.0) -> float:
    """E|z[k] - feedback - x[k - D]|^2 for any taps, with ideal feedback.

    It is Es times the squared error of the combined response after the feedback,
    plus N0 ||c||^2.
    """
    g = combined_response(c, h)
    e = 0.0
    for t, v in enumerate(g):
        want = 1.0 if t == delay else 0.0
        if delay < t <= delay + len(b):
            v = v - b[t - delay - 1]
        e += abs(v - want) ** 2
    return es * e + n0 * cbb.norm2(c)


def nearest(q: complex, alphabet: list[complex]) -> complex:
    """The point of the alphabet closest to q."""
    return min(alphabet, key=lambda a: abs(q - a))


def dfe_run(c: list[complex], b: list[complex], delay: int, y: list[complex], count: int, alphabet: list[complex], gain: float = 1.0, known: list[complex] | None = None) -> list[complex]:
    """Equalize y and return the decisions on x[0], ..., x[count - 1].

    The symbols before x[0] are taken as 0. gain is the bias factor 1 - J / Es that
    the slicer divides by. If known is given, the feedback uses the true symbols
    (ideal feedback, a genie) instead of the decisions.
    """
    dec = []
    nb = len(b)
    for k in range(count):  # @line L9
        n = k + delay
        z = sum(c[i] * y[n - i] for i in range(len(c)) if 0 <= n - i < len(y))  # @line L10
        past = known if known is not None else dec
        fb = sum(b[t] * past[k - 1 - t] for t in range(nb) if k - 1 - t >= 0)
        q = z - fb  # @line L11
        dec.append(nearest(q / gain, alphabet))  # @line L12
    return dec  # @line L13


def soft_outputs(c: list[complex], b: list[complex], delay: int, y: list[complex], count: int, known: list[complex]) -> list[complex]:
    """The slicer inputs q[k] with ideal feedback from the known symbols."""
    out = []
    for k in range(count):
        n = k + delay
        z = sum(c[i] * y[n - i] for i in range(len(c)) if 0 <= n - i < len(y))
        fb = sum(b[t] * known[k - 1 - t] for t in range(len(b)) if k - 1 - t >= 0)
        out.append(z - fb)
    return out
test_decision_feedback_equalizer.py 148 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/decision-feedback-equalizer/. The authors are listed in prov/K3EMZX.jsonl.

import math
import random

import pytest

import cbb
from decision_feedback_equalizer import (
    channel_matrix,
    combined_response,
    dfe_design,
    dfe_run,
    mse,
    soft_outputs,
)

PROAKIS_B = [0.407, 0.815, 0.407]
QPSK = [complex(a, b) / math.sqrt(2) for a in (-1, 1) for b in (-1, 1)]


def infinite_dfe_j(h, n0, es=1.0, grid=4096):
    # N0 / (geometric mean of |H|^2 + N0 / Es), by the midpoint rule on the unit circle
    s = 0.0
    for k in range(grid):
        w = 2 * math.pi * (k + 0.5) / grid
        hw = sum(v * complex(math.cos(w * l), -math.sin(w * l)) for l, v in enumerate(h))
        s += math.log(abs(hw) ** 2 + n0 / es)
    return n0 / math.exp(s / grid)


def test_example_on_the_page() -> None:
    want = [0.090909, 0.089069, 0.088705, 0.088634, 0.08862, 0.778511]
    for d, w in enumerate(want):
        assert abs(dfe_design([1, 0.5], 5, 1, d, 0.1)[2] - w) < 1e-6
    c, b, j = dfe_design([1, 0.5], 1, 1, 0, 0.1)
    assert abs(c[0] - 1 / 1.1) < 1e-12 and abs(b[0] - 0.5 / 1.1) < 1e-12 and abs(j - 0.1 / 1.1) < 1e-12
    jinf = 0.1 / ((1.35 + math.sqrt(1.35**2 - 1)) / 2)
    assert abs(jinf - 0.0886164) < 1e-7
    assert abs(dfe_design([1, 0.5], 15, 1, 14, 0.1)[2] - jinf) < 1e-7
    assert abs(cbb.db(1 / jinf - 1) - 10.12) < 0.005
    j = min(dfe_design(PROAKIS_B, 11, 2, d, 0.01)[2] for d in range(12))
    assert abs(j - 0.0296778) < 1e-6 and abs(cbb.db(1 / j - 1) - 15.14) < 0.01


def test_long_filters_reach_the_infinite_length_error() -> None:
    for h, n0 in (([1, 0.5], 0.1), (PROAKIS_B, 0.01), ([0.5, 1], 0.1)):
        jinf = infinite_dfe_j(h, n0)
        j = min(dfe_design(h, 25, len(h) - 1, d, n0)[2] for d in range(26))
        assert j >= jinf - 1e-9 and j - jinf < 1e-4


def test_design_error_matches_the_error_of_the_taps_and_is_minimal() -> None:
    rng = random.Random(7201)
    for _ in range(40):
        taps, nf = rng.randint(1, 4), rng.randint(1, 6)
        nb = rng.randint(0, 3)
        h = [cbb.cn(rng, 1.0) for _ in range(taps)]
        n0, es = rng.uniform(0.01, 1.0), rng.uniform(0.5, 2.0)
        d = rng.randint(0, nf + taps - 2)
        c, b, j = dfe_design(h, nf, nb, d, n0, es)
        assert abs(mse(c, b, h, d, n0, es) - j) < 1e-9
        # the cursor is the bias factor 1 - J / Es
        g = combined_response(c, h)
        assert abs(g[d] - (1 - j / es)) < 1e-9
        # the feedback cancels the postcursors exactly
        for t, v in enumerate(b, start=1):
            assert abs(v - (g[d + t] if d + t < len(g) else 0)) < 1e-12
        for _ in range(5):
            c2 = [v + cbb.cn(rng, 0.01) for v in c]
            b2 = [v + cbb.cn(rng, 0.01) for v in b]
            assert mse(c2, b2, h, d, n0, es) > j
            assert mse(c2, b, h, d, n0, es) > j


def test_feedback_never_hurts_with_ideal_decisions() -> None:
    rng = random.Random(7202)
    for _ in range(30):
        h = [cbb.cn(rng, 1.0) for _ in range(rng.randint(2, 4))]
        nf, n0 = rng.randint(2, 6), rng.uniform(0.01, 0.5)
        d = rng.randint(0, nf - 1)
        js = [dfe_design(h, nf, nb, d, n0)[2] for nb in range(4)]
        assert all(js[i + 1] <= js[i] + 1e-12 for i in range(3))


def test_noiseless_qpsk_is_recovered_with_decision_feedback() -> None:
    rng = random.Random(7203)
    for _ in range(10):
        h = [complex(1.0)] + [0.4 * cbb.cn(rng, 1.0) for _ in range(rng.randint(1, 3))]
        nf = 8
        best = min((dfe_design(h, nf, len(h) - 1, d, 1e-8)[2], d) for d in range(nf + len(h) - 1))
        d = best[1]
        c, b, j = dfe_design(h, nf, len(h) - 1, d, 1e-8)
        x = [rng.choice(QPSK) for _ in range(300)]
        y = cbb.conv(x, h)
        assert dfe_run(c, b, d, y, len(x), QPSK, 1 - j) == x


def test_mse_with_ideal_feedback_matches_j() -> None:
    rng = random.Random(7204)
    h, n0, nf, nb, d = [0.8 + 0.2j, -0.5, 0.3j], 0.05, 6, 2, 3
    c, b, j = dfe_design(h, nf, nb, d, n0)
    count = 20000
    x = [rng.choice(QPSK) for _ in range(count)]
    y = cbb.awgn(rng, cbb.conv(x, h), n0)
    q = soft_outputs(c, b, d, y, count, x)
    e = [abs(q[k] - x[k]) ** 2 for k in range(20, count)]
    m = sum(e) / len(e)
    sd = math.sqrt(sum((v - m) ** 2 for v in e) / (len(e) - 1))
    assert abs(m - j) < 3.29 * sd / math.sqrt(len(e))


def test_zf_dfe_bpsk_error_rate_with_ideal_feedback() -> None:
    # c = 1 and b = 0.5 cancel the ISI of (1, 0.5) with noise gain 1, so the BER is Q(sqrt(2 / N0))
    rng = random.Random(7205)
    n0, count = 0.3, 40000
    x = [rng.choice((-1, 1)) for _ in range(count)]
    y = [v + rng.gauss(0.0, math.sqrt(n0 / 2)) for v in cbb.conv(x, [1, 0.5])[:count]]
    dec = dfe_run([1], [0.5], 0, y, count, [-1, 1], known=x)
    err = sum(1 for p, q in zip(dec, x) if p != q)
    p = cbb.qfunc(math.sqrt(2 / n0))
    assert p * count >= 100
    lo, hi = cbb.wilson(err, count)
    assert lo <= p <= hi


def test_error_propagation_is_measured() -> None:
    # the same noise with decided feedback: more errors than with ideal feedback, but not many more
    rng = random.Random(7206)
    n0, count = 0.3, 40000
    x = [rng.choice((-1, 1)) for _ in range(count)]
    y = [v + rng.gauss(0.0, math.sqrt(n0 / 2)) for v in cbb.conv(x, [1, 0.5])[:count]]
    genie = sum(1 for p, q in zip(dfe_run([1], [0.5], 0, y, count, [-1, 1], known=x), x) if p != q)
    real = sum(1 for p, q in zip(dfe_run([1], [0.5], 0, y, count, [-1, 1]), x) if p != q)
    assert genie < real < 2 * genie


def test_channel_matrix_and_input_checks() -> None:
    assert channel_matrix([1, 2], 2) == [[1, 2, 0], [0, 1, 2]]
    with pytest.raises(ValueError):
        dfe_design([1, 0.5], 3, 1, 4, 0.1)
    with pytest.raises(ValueError):
        dfe_design([1, 0.5], 3, -1, 0, 0.1)
    with pytest.raises(ValueError):
        dfe_design([1, 0.5], 0, 1, 0, 0.1)
    with pytest.raises(ValueError):
        dfe_design([1, 0.5], 3, 1, 0, -0.1)

History

Austin proposed decision feedback for digital communication over dispersive channels in a 1967 MIT report. In 1973, Salz derived the optimum mean-square DFE of infinite length and its minimum error, the geometric mean form above. The DFE became a common receiver for voiceband modems. Tomlinson in 1971 and Harashima and Miyakawa in 1972 moved the feedback to the transmitter. In 1995, Cioffi, Dudevoir, Eyuboglu and Forney showed that the unbiased MMSE-DFE is canonical: with ideal feedback and Gaussian codes, it reaches the capacity of the ISI channel.

References

  1. John G. Proakis and Masoud Salehi, Digital Communications, fifth edition, McGraw-Hill, 2008, Section 9.5 (decision-feedback equalization), with 9.5-1 (coefficient optimization) and 9.5-2 (performance and error propagation)
  2. John R. Barry, Edward A. Lee and David G. Messerschmitt, Digital Communication, third edition, Kluwer Academic Publishers, 2004, Chapter 8 (equalization)
  3. M. E. Austin, Decision-feedback equalization for digital communication over dispersive channels, Technical Report 461, MIT Research Laboratory of Electronics, August 1967, the decision feedback structure
  4. J. Salz, Optimum mean-square decision feedback equalization, Bell System Technical Journal 52(8), 1973, pages 1341 to 1373, the infinite-length MMSE-DFE and its error

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH1 sketch
  • a full proof of time.worst
  • a full proof of space.extra
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a scene preset for the example