Algorithmcore
Single-carrier frequency-domain equalization
Also called SC-FDE, frequency-domain equalizer.
Equalizes a block of single-carrier symbols with a cyclic prefix by one complex tap per FFT bin.
- Solves
- Channel equalization
- Time
- O(N log N) worst
- Space
- O(N) extra
- Where
- L = the number of channel taps; N = the block length; P = the prefix length
- Model
- Real RAM
- Properties
- deterministiclinearneeds channelneeds cyclic prefix
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Hikmet Sari, Georges Karam, Isabelle Jeanclaude, 1995
Single-carrier frequency-domain equalization (SC-FDE) equalizes a long channel with one complex multiplication per frequency bin. The transmitter sends the symbols in blocks of and puts a cyclic prefix of samples in front of each block. After the receiver removes the prefix, the channel acts on the block as a circular convolution, so the DFT of the block is the DFT of the symbols times the channel frequency response, bin by bin. The receiver divides by the response (zero forcing) or applies the MMSE weight in each bin and returns to the time domain with an inverse DFT. The decisions are made in the time domain, on the symbols themselves. This is the same block structure as OFDM, with the inverse DFT moved from the transmitter to the receiver. SC-FDMA uses the same receiver for multiple users.
In plain words
A time-domain equalizer for a long channel needs a long filter, and every output costs one multiplication per filter tap. In the frequency domain, a channel is only a gain and a phase per frequency, so undoing it is one division per frequency. The catch is that this is exact only for circular convolution, where the block wraps around. The cyclic prefix makes the channel wrap around: it repeats the end of the block at the front, so the echo of the previous block falls only on the prefix, and the receiver throws the prefix away. The fast Fourier transform makes the change of domain cheap.
The problem
The input is a received block of samples , where is the prefix followed by the block , the channel is known, , and is white . The symbols are independent with energy . The output is an estimate of the block: the zero-forcing estimate, which removes all ISI, or the linear MMSE estimate, which minimizes among all linear functions of the received block.
The algorithm
The DFT is unnormalized, , and the inverse DFT has the factor .
SC-FDE(r, h, N, P, N0, Es)- 1
y ← r[P .. P+N-1] ▷ remove the cyclic prefix - 2
Y ← FFT(y) - 3
H ← FFT(h padded with zeros to N) ▷ once per channel - 4
W[k] ← 1 / H[k] ▷ zero forcing - 5
or W[k] ← conj(H[k]) / (|H[k]|² + N0/Es) ▷ MMSE - 6
return IFFT(W[k] Y[k])
Line L1 is where the prefix matters: when , the samples that line L1 keeps contain no sample of the previous block, and is the circular convolution of and . Line L2 turns it into . Lines L4 and L5 are the one-tap equalizers. The MMSE taps are the Wiener filter of each bin, and together they give exactly the block MMSE estimate. Line L6 returns to the symbols. The fast Fourier transform does lines L2, L3 and L6.
Example
Take , , and the BPSK block . The transmitted samples are , with the last symbol copied in front. After the prefix is removed and without noise, , a circular convolution. In the frequency domain:
| MMSE tap, | ||||||
|---|---|---|---|---|---|---|
| 0 | 0 | 1.5 | 0 | 0 | 2.25 | 0.6383 |
| 1 | 1.25 | |||||
| 2 | 0 | 0.5 | 0 | 0 | 0.25 | 1.4286 |
| 3 | 1.25 |
The ZF output is the inverse DFT of , which is exactly. With and , the noise after ZF has the variance per symbol, most of it from bin 2, where ZF multiplies by 2. The MMSE taps hold back in that bin, and the MSE is . The MMSE output is biased: without noise it is for this block, because both used bins have .
On the channel B of Proakis, , with , dB and QPSK, the bin has . ZF multiplies the noise in that bin by , and the noise variance per symbol is 1707. The MMSE formula gives , and 200 blocks with seed 7805 measured 0.3329. The unbiased SINR is , which is 2.95 dB.
Correctness
Claim. With , the ZF output is plus noise of the variance per symbol, and the MMSE output equals the block linear MMSE estimate for the circulant channel matrix . Its MSE is for every symbol, and its unbiased SINR is .
Key step. The prefix makes the channel matrix circulant, and the DFT diagonalizes every circulant matrix, with the eigenvalues . So the matrix inverse in the MMSE formula becomes scalar divisions. The error covariance is circulant too, so all symbols have the same MSE, the average of the per-bin errors. The proofs folder has the details.
Proof: With a cyclic prefix of at least L-1 samples, one tap per DFT bin gives the zero-forcing and the block MMSE equalizers exactly, with the stated mean squared errorsfull
The channel taps are . A block of independent zero-mean symbols with is sent as , a cyclic prefix of samples followed by the block. The received samples are with white , where for are samples of the previous block. The DFT is unnormalized: , and the inverse has the factor . Write for the DFT of padded with zeros to length (line L3).
Lemma 1 (the prefix makes the convolution circular). If , then after the prefix is removed (line L1), for , whatever the previous block was.
Proof. uses for . The index , so no sample of the previous block enters. If , then . If , then is in the prefix and .
Lemma 2 (one tap per bin). With (line L2), , where the are i.i.d. .
Proof. The DFT of a circular convolution is the product of the DFTs. The DFT matrix has , so has the covariance , and it is circular Gaussian as a linear map of .
In matrix form, with the circulant matrix (zero where the index is or more). With the unitary , Lemma 2 says with .
Theorem 1 (zero forcing). If every , lines L4 and L6 give . Without noise . The noise in each output sample has the variance .
Proof. . The noise sample is , a sum of independent terms, so its variance is .
Theorem 2 (MMSE). Lines L5 and L6 compute with , which is the linear MMSE estimate of from .
Proof. The linear MMSE estimate of with covariance from is , which equals by the push-through identity. Substitute : the matrix is . Applying it to is the DFT, one multiplication per bin and the inverse DFT, because .
Theorem 3 (the MMSE value). Each output sample of the MMSE equalizer has the mean squared error
Proof. The error covariance of the linear MMSE estimate is . This matrix is circulant, so all diagonal entries are equal to the trace divided by , and the trace is the sum of the eigenvalues.
Corollary 1 (bias and SINR). The MMSE output is with and uncorrelated with , of variance . So the unbiased output has the SINR .
Proof. The output is with , a circulant matrix with all diagonal entries . The rest, , is uncorrelated with because the symbols are independent with zero mean and the noise is independent of them. Then , so , and the SINR of is .
Theorem 4 (the cost). With a power of 2, lines L2 and L6 cost each by the radix-2 FFT, and lines L4 and L5 cost . The DFT of (line L3) is needed once per channel. So a block of symbols costs , or per symbol.
Proof. The radix-2 FFT does passes of butterflies.
Complexity
The FFT and the inverse FFT cost each for a power of 2, and the taps cost , so a block costs in the real RAM, or per symbol, with extra space. The channel FFT is computed once per channel estimate. A time-domain equalizer with taps costs per block, and must grow with the channel length , so SC-FDE wins for long channels. The prefix costs a fraction of the throughput, which is why is chosen much larger than .
Properties
- Exact block equalizers. The ZF and MMSE outputs are the exact block ZF and block MMSE estimates for the circular channel, not approximations of a finite filter.
- Same MSE for every symbol. The error covariance is circulant, so no symbol of the block is worse off. A time-domain block equalizer without a prefix has worse errors at the block edges.
- Averaging over frequency. The MSE is an average over the bins of . A deep fade in one bin raises the MSE of all symbols a little, instead of destroying the subcarriers in that bin, as in uncoded OFDM.
- Biased MMSE. The MMSE output is with . Scale by before a slicer for QAM.
- Single-carrier envelope. The transmitter sends the symbols directly, so the peak-to-average power ratio is that of the constellation and the pulse, lower than for OFDM.
- Linear. It is a linear equalizer and inherits the loss of linear equalizers on channels with deep nulls.
Variants and improvements
- Frequency-domain DFE. A frequency-domain feedforward filter followed by a short time-domain feedback filter, which recovers much of the loss on channels with deep nulls. See the decision feedback equalizer.
- Iterative block DFE and turbo FDE. Repeat the FDE with soft decisions from a decoder to cancel the residual ISI, as in turbo equalization and the soft interference cancellation equalizer.
- SC-FDMA. Each user spreads its block with a DFT and maps it to some of the subcarriers of a larger IFFT. The receiver equalizes per bin and despreads with an inverse DFT. See SC-FDMA.
- Unique word. A known sequence in place of the cyclic prefix, at the end of every block, also makes the convolution circular and can serve as a pilot.
- Overlap methods without a prefix. The overlap-save method equalizes a continuous stream in the frequency domain with no prefix, at the cost of discarded overlap samples at the receiver.
- Channel estimation. With a known block or pilot bins, is estimated per bin by least squares, then smoothed by limiting the impulse response to taps. See least-squares channel estimation.
When to use it
Use SC-FDE for long channels and high symbol rates, when the transmitter must keep a low peak-to-average power ratio: broadband wireless uplinks, satellite links and mobile terminals. Use OFDM when the transmitter can adapt the rate per subcarrier, and a Viterbi equalizer or a time-domain DFE when the channel is short and no prefix is in the frame format.
Pitfalls
- A prefix shorter than the channel. If , the previous block leaks into the kept samples and the convolution is not circular. The error does not go away at high SNR. A channel shortening equalizer can shorten the channel first.
- ZF near a null. Dividing by a small blows up the noise in that bin and spreads it over every symbol. On the channel B of Proakis with , ZF gives a noise variance of 1707 per symbol. Use the MMSE taps.
- Forgetting the bias. The MMSE output is scaled by . For QAM with several amplitude levels, scale by before deciding.
- The DFT scaling. With the unnormalized DFT, the noise per bin has variance , and the inverse DFT carries the factor . Mixing conventions gives the wrong in the MMSE taps.
- Timing. The kept window must start at the first sample of the block. A window that starts samples early still sees a circular convolution if , but with the channel shifted circularly by samples, so the channel estimate must come from the same window. A window that starts late takes in the next block.
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.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/frequency-domain-equalization/. The authors are listed in prov/8TF7E6.jsonl.
"""Single-carrier frequency-domain equalization (SC-FDE) with a cyclic prefix.
The transmitter sends blocks of N symbols, each with a cyclic prefix of P >= L-1
samples. After the prefix is removed, the channel acts on the block as a circular
convolution, y = h (*) x + w with w white CN(0, N0). The DFT (unnormalized,
X[k] = sum_n x[n] e^{-j 2 pi k n / N}) turns it into Y[k] = H[k] X[k] + W[k].
The equalizer is one tap per bin, W[k] = 1/H[k] (zero forcing) or
W[k] = conj(H[k]) / (|H[k]|^2 + N0/Es) (MMSE), followed by the inverse DFT.
The FFT here is the iterative radix-2 Cooley-Tukey algorithm; other sizes use
the direct DFT.
"""
import cmath
import math
def fft(x: list[complex], inverse: bool = False) -> list[complex]:
"""The unnormalized DFT of x (or the inverse DFT, with the 1/N factor)."""
n = len(x)
a = [complex(v) for v in x]
sign = 1 if inverse else -1
if n & (n - 1) or n == 0:
out = [sum(a[t] * cmath.exp(sign * 2j * math.pi * k * t / n) for t in range(n)) for k in range(n)]
else:
j = 0
for i in range(1, n): # bit reversal
bit = n >> 1
while j & bit:
j ^= bit
bit >>= 1
j |= bit
if i < j:
a[i], a[j] = a[j], a[i]
size = 2
while size <= n:
w = cmath.exp(sign * 2j * math.pi / size)
for start in range(0, n, size):
wk = 1 + 0j
for k in range(size // 2):
u, v = a[start + k], a[start + k + size // 2] * wk
a[start + k], a[start + k + size // 2] = u + v, u - v
wk *= w
size *= 2
out = a
if inverse and n:
out = [v / n for v in out]
return out
def add_cyclic_prefix(x: list[complex], p: int) -> list[complex]:
return list(x[len(x) - p:]) + list(x) if p else list(x)
def fde(r: list[complex], h: list[complex], n: int, p: int, n0: float | None = None, es: float = 1.0) -> list[complex]:
"""Equalize one received block r of n + p samples (prefix first).
n0 = None gives zero forcing; otherwise the MMSE taps for noise CN(0, n0)
and symbol energy es. Returns the n soft estimates of x.
"""
if len(h) - 1 > p:
raise ValueError("the cyclic prefix must hold at least L-1 samples")
if len(r) != n + p:
raise ValueError("r must hold n + p samples")
y = r[p:] # @line L1
yf = fft(y) # @line L2
hf = fft(list(h) + [0j] * (n - len(h))) # @line L3
if n0 is None:
w = [1 / v for v in hf] # @line L4
else:
w = [v.conjugate() / (abs(v) ** 2 + n0 / es) for v in hf] # @line L5
return fft([a * b for a, b in zip(w, yf)], inverse=True) # @line L6
def mmse_mse(h: list[complex], n: int, n0: float, es: float = 1.0) -> float:
"""The MSE per symbol of the MMSE-FDE: (1/N) sum_k N0 Es / (Es |H[k]|^2 + N0)."""
hf = fft(list(h) + [0j] * (n - len(h)))
return sum(n0 * es / (es * abs(v) ** 2 + n0) for v in hf) / n
def zf_mse(h: list[complex], n: int, n0: float) -> float:
"""The noise variance per symbol after the ZF-FDE: (1/N) sum_k N0 / |H[k]|^2."""
hf = fft(list(h) + [0j] * (n - len(h)))
return sum(n0 / abs(v) ** 2 for v in hf) / n
def channel(s: list[complex], h: list[complex], prev: list[complex] | None = None) -> list[complex]:
"""Linear convolution of the transmitted samples s with h, cut to len(s).
prev holds the samples sent before s (the previous block), so that its tail
falls into the prefix of s, as in a real stream.
"""
prev = list(prev) if prev is not None else []
full = prev + list(s)
off = len(prev)
return [sum(h[l] * full[off + k - l] for l in range(len(h)) if off + k - l >= 0) for k in range(len(s))]
test_frequency_domain_equalization.py 134 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/frequency-domain-equalization/. The authors are listed in prov/8TF7E6.jsonl.
import cmath
import math
import random
import pytest
from frequency_domain_equalization import add_cyclic_prefix, channel, fde, fft, mmse_mse, zf_mse
def cn(rng, var):
s = math.sqrt(var / 2)
return complex(rng.gauss(0, s), rng.gauss(0, s))
def dft(x):
n = len(x)
return [sum(x[t] * cmath.exp(-2j * math.pi * k * t / n) for t in range(n)) for k in range(n)]
def solve(a, b):
n = len(a)
m = [row[:] + [b[i]] for i, row in enumerate(a)]
for c in range(n):
p = max(range(c, n), key=lambda r: abs(m[r][c]))
m[c], m[p] = m[p], m[c]
for r in range(c + 1, n):
f = m[r][c] / m[c][c]
for k in range(c, n + 1):
m[r][k] -= f * m[c][k]
x = [0j] * n
for r in range(n - 1, -1, -1):
x[r] = (m[r][n] - sum(m[r][k] * x[k] for k in range(r + 1, n))) / m[r][r]
return x
QPSK = [complex(a, b) / math.sqrt(2) for a in (-1, 1) for b in (-1, 1)]
def test_example_on_the_page() -> None:
x = [1, -1, -1, 1]
r = channel(add_cyclic_prefix(x, 1), [1, 0.5])
assert r[1:] == [1.5, -0.5, -1.5, 0.5]
y = fft(r[1:])
want = [0, 3 + 1j, 0, 3 - 1j]
assert max(abs(a - b) for a, b in zip(y, want)) < 1e-12
hf = fft([1, 0.5, 0, 0])
assert max(abs(a - b) for a, b in zip(hf, [1.5, 1 - 0.5j, 0.5, 1 + 0.5j])) < 1e-12
assert max(abs(a - b) for a, b in zip(fde(r, [1, 0.5], 4, 1), x)) < 1e-12
assert abs(mmse_mse([1, 0.5], 4, 0.1) - 0.119104) < 1e-6
assert abs(zf_mse([1, 0.5], 4, 0.1) - 0.151111) < 1e-6
def test_fft_matches_the_direct_dft() -> None:
rng = random.Random(7801)
for n in list(range(1, 17)) + [32, 64]:
x = [cn(rng, 1.0) for _ in range(n)]
a, b = fft(x), dft(x)
assert max(abs(u - v) for u, v in zip(a, b)) < 1e-9
back = fft(a, inverse=True)
assert max(abs(u - v) for u, v in zip(back, x)) < 1e-9
def test_zero_forcing_inverts_the_channel_without_noise() -> None:
rng = random.Random(7802)
for _ in range(30):
taps = rng.randint(1, 6)
h = [cn(rng, 1.0) for _ in range(taps)]
n = rng.choice((8, 12, 16, 32))
p = taps - 1 + rng.randint(0, 2)
prev = [rng.choice(QPSK) for _ in range(n + p)]
x = [rng.choice(QPSK) for _ in range(n)]
r = channel(add_cyclic_prefix(x, p), h, prev) # the previous block's tail falls into the prefix
est = fde(r, h, n, p)
assert max(abs(a - b) for a, b in zip(est, x)) < 1e-9
def test_short_prefix_leaves_interblock_interference() -> None:
rng = random.Random(7803)
h = [1, 0.6, 0.4, 0.3]
x = [rng.choice(QPSK) for _ in range(16)]
prev = [rng.choice(QPSK) for _ in range(17)]
r = channel(add_cyclic_prefix(x, 1), h, prev)
with pytest.raises(ValueError):
fde(r, h, 16, 1)
# the one-tap equalizer applied anyway: the tail of the previous block stays in the result
y = r[1:]
xf, hf = fft(y), fft(h + [0] * 12)
wrong = fft([a / b for a, b in zip(xf, hf)], inverse=True)
assert max(abs(a - b) for a, b in zip(wrong, x)) > 1e-2
def test_mmse_equals_the_circulant_matrix_solution() -> None:
rng = random.Random(7804)
for _ in range(6):
n, h = rng.choice((8, 12, 16)), [cn(rng, 1.0) for _ in range(3)]
n0, es = rng.uniform(0.05, 1.0), rng.uniform(0.5, 2.0)
r = [cn(rng, 1.0) for _ in range(n + 2)]
est = fde(r, h, n, 2, n0, es)
hc = [[h[(i - j) % n] if (i - j) % n < len(h) else 0j for j in range(n)] for i in range(n)]
y = r[2:]
a = [[sum(hc[k][i].conjugate() * hc[k][j] for k in range(n)) + (n0 / es if i == j else 0) for j in range(n)] for i in range(n)]
b = [sum(hc[k][i].conjugate() * y[k] for k in range(n)) for i in range(n)]
want = solve(a, b)
assert max(abs(u - v) for u, v in zip(est, want)) < 1e-9
def test_measured_mse_matches_the_formula() -> None:
# QPSK with Es = 1, N = 64, P = 2, N0 = 0.1, 200 blocks, seed 7805: MMSE on Proakis channel B
# and ZF on (1, 0.5); ZF on B is useless, because B has |H|^2 = 1e-6 at bin 32
rng = random.Random(7805)
n, p, n0 = 64, 2, 0.1
for h, mode in (([0.407, 0.815, 0.407], n0), ([1, 0.5], None)):
formula = mmse_mse(h, n, n0) if mode else zf_mse(h, n, n0)
total, count = 0.0, 0
prev = [rng.choice(QPSK) for _ in range(n + p)]
for _ in range(200):
x = [rng.choice(QPSK) for _ in range(n)]
s = add_cyclic_prefix(x, p)
r = [v + cn(rng, n0) for v in channel(s, h, prev)]
prev = s
est = fde(r, h, n, p, mode)
total += sum(abs(a - b) ** 2 for a, b in zip(est, x))
count += n
assert abs(total / count - formula) < 0.04 * formula
def test_input_checks() -> None:
with pytest.raises(ValueError):
fde([0j] * 9, [1, 0.5, 0.2], 8, 1)
with pytest.raises(ValueError):
fde([0j] * 8, [1, 0.5], 8, 1)
History
In 1995, Sari, Karam and Jeanclaude compared OFDM with single-carrier transmission equalized in the frequency domain for digital terrestrial television, and showed that the two receivers have about the same complexity when both use the FFT. In 2002, Falconer, Ariyavisitakul, Benyamin-Seeyar and Eidson described SC-FDE for broadband wireless, with the cyclic prefix, the ZF and MMSE taps, the decision feedback variants and the comparison with OFDM. SC-FDMA, the uplink of LTE, uses the same receiver.
References
- David Falconer, Sirikiat Lek Ariyavisitakul, Anader Benyamin-Seeyar and Brian Eidson, Frequency domain equalization for single-carrier broadband wireless systems, IEEE Communications Magazine 40(4), 2002, pages 58 to 66, the block structure with the cyclic prefix, the ZF and MMSE taps per bin, and the comparison with OFDM
- Hikmet Sari, Georges Karam and Isabelle Jeanclaude, Transmission techniques for digital terrestrial TV broadcasting, IEEE Communications Magazine 33(2), 1995, pages 100 to 109, single-carrier transmission with frequency-domain equalization against OFDM
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 8TF7E6 Edit this page History Report an error Markdown