Algorithmadvanced
Regularized zero-forcing precoding
Also called RZF precoding, MMSE precoding.
Adds a regularization term to the channel inversion, which trades residual interference for less noise enhancement.
- Time
- O(K^2 M + K^3) worst
- Space
- O(M K) extra
- Where
- K = the number of single-antenna users; M = the number of base station antennas
- Model
- Real RAM
- Properties
- deterministiclinearminimizes sum mseneeds channel at transmitterneeds noise levelnot zero interference
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Christian B. Peel, Bertrand M. Hochwald, A. Lee Swindlehurst, 2005
Regularized zero-forcing (RZF) precoding is the linear multiuser precoder with and a scalar that sets the transmit power to . It sits between the two simple linear precoders. With it is zero-forcing precoding, which removes all interference but can need much power when the channel matrix is badly conditioned. With it sends each user a beam along its own channel, as maximum ratio transmission does, and ignores interference. The choice minimizes the sum mean squared error at the users, so RZF is the transmit form of the MMSE filter. The same regularized inverse appears at the receiver in the MMSE linear equalizer, the MMSE MIMO detector and the MMSE multiuser detector; here it is applied before the channel, and the regularization is because the noise is at the receivers while the power limit is at the transmitter. Vector perturbation precoding adds an integer offset to the data before the same inverse, and weighted MMSE precoding tunes the beams to a weighted sum rate instead of the plain sum MSE.
In plain words
A base station sends to several users at once. One simple method aims a beam at each user and ignores the others. Another method cancels every leak between users completely, but it may spend a lot of power to do this when two users are in similar directions. Regularized zero forcing takes a middle path. It cancels most of the leaks but stops when the cost in power gets too high. How far it goes depends on the noise: with much noise it cares more about signal strength, and with little noise it cares more about canceling the leaks. The result is a smaller total error at the users than either simple method.
The problem
User receives , with known at the base station, , , and the power . Each user scales its sample by the same real factor . The goal is the linear precoder that minimizes the sum MSE , as a cheap and robust stand-in for the sum rate. Unlike zero forcing, RZF also works when with a badly conditioned , and even when , because is always invertible.
The algorithm
RZF-PRECODE(H, P, N0)- 1
α ← K N0 / P ▷ the regularization - 2
A ← H Hᴴ ▷ K × K - 3
A ← A + α I - 4
F ← Hᴴ A⁻¹ ▷ solve A X = H, F = Xᴴ - 5
β ← √(P / ‖F‖²_F) ▷ meet the power exactly - 6
return W = β F
Line L4 needs one factorization of a Hermitian positive definite matrix, for example a Cholesky decomposition, and solves. By the push-through identity, , so a base station with can invert the smaller matrix instead. Line L5 does not change the directions of the beams, only the common power.
Example
Take the same channel as on the zero-forcing page: , , and
Line L1 gives . Then with , and
So each user still hears some interference ( against the signals and ). Line L5 gives and . The SINRs are 3.425 and 1.678, and the sum rate is 3.567 bits per channel use. The table compares RZF with the other linear precoders on this channel; the zero-forcing rows are from the zero-forcing page:
| precoder | |||
|---|---|---|---|
| RZF, | 1.737 | 3.567 | 8.066 |
| zero forcing, channel inversion | 0.385 | 2.560 | 7.868 |
| zero forcing, water-filling | 0.585 | 2.853 | |
| maximum ratio transmission, equal power | 1.433 | 2.045 |
At the sum MSE of RZF is , against 1.4 for the plain inverse. At high power RZF and zero forcing come close, because goes to 0.
Correctness
The proof is in proofs/correctness.md. Theorem 1 shows that the scaling of line L5 meets the power constraint exactly. Lemma 2 writes the sum MSE of any scaled precoder as , which does not depend on the scale of . Theorem 2 shows that this is a Tikhonov regularization problem whose unique minimizer is the of line L4, with the minimum ; this is the transmit Wiener filter of Joham, Utschick and Nossek. Theorem 3 shows that the limits and give zero forcing with channel inversion and matched beams .
Proof: RZF meets the power constraint, minimizes the sum MSE with a common receive scale, and tends to zero forcing and to matched beams at its two limitsfull
The model is for , with , , and . Lines L1 to L5 compute , , and . Each user scales its sample by .
Lemma 1 (push-through identity). For , both and are positive definite, and .
Proof. For , , and the same holds for the other matrix. Then . Multiply on the left by and on the right by .
Theorem 1 (power). .
Proof. . Here if , because has the positive eigenvalues for the positive eigenvalues of .
Lemma 2 (the MSE of a scaled precoder). For with , the sum MSE with the common receive scale is
Proof. , so . The two terms are independent with zero mean, so the MSE is , and .
The right side does not change when is multiplied by a positive scalar together with the matching . So minimizing it over is the same as minimizing the MSE over all pairs with .
Theorem 2 (the transmit Wiener filter). The function with has the unique minimizer , and the minimum is .
Proof. is a sum of independent problems, one for each column of : . Each is a Tikhonov regularization problem. Expand it as . The quadratic form is positive definite by Lemma 1, so the function is strictly convex, and its unique minimizer is the zero of the gradient, . So , which is by Lemma 1. For the value, let . Then , and
So, by Lemma 2 and the remark after it, the RZF precoder of lines L1 to L6 minimizes the sum MSE over all linear precoders with power and a common receive scale. This is the transmit Wiener filter of Joham, Utschick and Nossek (2005).
Theorem 3 (the two limits). Let have full row rank. As , tends to , the zero-forcing precoder with the channel inversion power rule, so tends to a multiple of . As , tends to , a matched beam for each user with the power share .
Proof. does not change when is multiplied by a positive scalar. As , by continuity of the inverse at the invertible matrix . As , . In both cases the normalization by gives the stated limits.
The tests check Theorem 1 within , Theorem 2 by the zero gradient (the KKT condition of the unconstrained problem), by random perturbations of , by a grid search over each column of for real channels and by the closed form of the minimum, Theorem 3 at and , and the example values of the page.
Complexity
Lines L2 and L3 cost multiplications. Line L4 costs for the factorization and for the solves, or with the push-through form. Line L5 costs . The total is per channel realization, with extra space, the same as zero forcing.
Properties
- Minimum sum MSE. Among linear precoders with power and a common receive scale, RZF has the smallest sum MSE (theorem).
- Always defined. is invertible for every when , including .
- Between two extremes. gives zero forcing, and gives beams along each user's channel (theorem).
- Needs the noise level. Unlike zero forcing, RZF uses . A wrong value moves it toward one of the two extremes.
- Residual interference. is not diagonal. If stays fixed while grows, the SINR of each user stops at a finite value. With , falls with , and for and a channel of full row rank the sum rate grows like .
- Large . Peel, Hochwald and Swindlehurst showed that the sum rate of RZF grows linearly with , while plain channel inversion does not.
Variants and improvements
- Per-user regularization. With unequal path losses or noise levels, use or the general MMSE form with a weight per user.
- Imperfect channel knowledge. Add the estimation error variance to . The large-system analysis of RZF gives the best for a given error level.
- Regularized vector perturbation. Perturb the data by an integer vector before the regularized inverse; see vector perturbation precoding.
- Weighted MMSE. Replace the sum MSE by a weighted sum of MSEs with weights updated from the rates; this gives a local optimum of the weighted sum rate; see weighted MMSE precoding.
- Multi-antenna users. Regularized block diagonalization applies the same idea to block diagonalization.
When to use it
Use RZF as the default linear precoder in a multiuser downlink when the base station knows the channel and the noise level, especially when is close to or when the SNR is low or moderate. It costs the same as zero forcing and is never worse than it in sum MSE. At very high SNR with , zero forcing and RZF are nearly the same. When the sum rate itself must be maximized with user weights, start from RZF and refine it with weighted MMSE precoding.
Pitfalls
- The name "MMSE precoding". It is used for RZF, for the transmit Wiener filter with a common scale (the same thing), and for other designs with per-user receive gains or with power constraints per antenna. Check the cost function before comparing results.
- Not the sum rate optimum. minimizes the sum MSE, not the sum rate. On the example channel at , gives a sum rate of 1.741, a little more than the 1.737 of .
- Wrong regularization. Using instead of , or the SNR in dB, gives a precoder that is close to one of the extremes.
- Normalization. Normalizing each column of separately changes the precoder. Line L5 uses one common scale.
- Stale channel. As for zero forcing, an old channel estimate leaves interference that grows with .
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
# 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)
regularized_zero_forcing_precoding.py 57 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/regularized-zero-forcing-precoding/. The authors are listed in prov/E77HBP.jsonl.
"""Regularized zero-forcing (RZF) precoding for the multiuser MISO downlink.
User k receives y_k = h_k^H x + w_k with w_k ~ CN(0, N0). The K by M matrix H
has row k equal to h_k^H. The transmitter sends x = W s with E[s s^H] = I and
tr(W^H W) = P, where
F = H^H (H H^H + alpha I)^(-1), W = beta F, beta = sqrt(P / ||F||_F^2),
and alpha = K N0 / P by default. Every user scales its signal by 1 / beta.
With this alpha, F minimizes the sum MSE ||I - H F||_F^2 + (K N0 / P) ||F||_F^2
(the transmit Wiener filter). alpha -> 0 gives the zero-forcing channel
inversion and alpha -> infinity gives a precoder along H^H.
"""
import math
import cbb
def rzf_precoder(h: list[list[complex]], p_total: float, n0: float, alpha: float | None = None):
"""The RZF precoder of the K by M channel h. Returns (w, beta, f)."""
k_users = len(h)
if alpha is None:
alpha = k_users * n0 / p_total # @line L1
g = cbb.matmul(h, cbb.herm(h)) # @line L2
for i in range(k_users):
g[i][i] += alpha # @line L3
f = cbb.herm(cbb.solve(g, h)) # @line L4
# solve(g, h) = (H H^H + alpha I)^(-1) H, and its conjugate transpose is F.
beta = math.sqrt(p_total / cbb.norm2(f)) # @line L5
w = cbb.scale(beta, f)
return w, beta, f # @line L6
def sum_mse(h: list[list[complex]], f: list[list[complex]], p_total: float, n0: float) -> float:
"""E||s - y / beta||^2 = ||I - H F||_F^2 + (K N0 / P) ||F||_F^2 for W = beta F with tr(W^H W) = P."""
k_users = len(h)
e = cbb.sub(cbb.eye(k_users), cbb.matmul(h, f))
return cbb.norm2(e) + k_users * n0 / p_total * cbb.norm2(f)
def sinr(h: list[list[complex]], w: list[list[complex]], n0: float) -> list[float]:
"""SINR_k = |h_k^H w_k|^2 / (sum over j != k of |h_k^H w_j|^2 + N0)."""
e = cbb.matmul(h, w)
out = []
for k in range(len(h)):
sig = abs(e[k][k]) ** 2
out.append(sig / (sum(abs(x) ** 2 for x in e[k]) - sig + n0))
return out
def sum_rate(h: list[list[complex]], w: list[list[complex]], n0: float) -> float:
"""The sum rate sum log2(1 + SINR_k) in bits per channel use."""
return sum(math.log2(1.0 + s) for s in sinr(h, w, n0))
test_regularized_zero_forcing_precoding.py 130 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/regularized-zero-forcing-precoding/. The authors are listed in prov/E77HBP.jsonl.
import math
import random
import cbb
from regularized_zero_forcing_precoding import rzf_precoder, sinr, sum_mse, sum_rate
def rand_h(rng: random.Random, k: int, m: int) -> list[list[complex]]:
return [[cbb.cn(rng, 1.0) for _ in range(m)] for _ in range(k)]
def max_abs(a: list[list[complex]]) -> float:
return max(abs(x) for row in a for x in row)
def test_example() -> None:
h = [[2, 1], [1, 1]]
w, beta, f = rzf_precoder(h, 10.0, 1.0)
want_f = [[1.4 / 2.44, -0.8 / 2.44], [-0.8 / 2.44, 2.2 / 2.44]]
assert max_abs(cbb.sub(f, want_f)) < 1e-12
assert abs(beta - math.sqrt(10 / (8.08 / 2.44**2))) < 1e-12
s = sinr(h, w, 1.0)
assert abs(s[0] - 3.4247) < 5e-5 and abs(s[1] - 1.6781) < 5e-5
assert abs(sum_rate(h, w, 1.0) - 3.5668) < 5e-5
assert abs(sum_mse(h, f, 10.0, 1.0) - 0.2 * 7.4 / 2.44) < 1e-12
def test_power_constraint() -> None:
rng = random.Random(1)
for k, m in [(1, 1), (2, 2), (3, 5), (4, 4), (8, 8)]:
h = rand_h(rng, k, m)
pt = rng.uniform(0.1, 100.0)
w, _, _ = rzf_precoder(h, pt, rng.uniform(0.1, 2.0))
assert abs(cbb.norm2(w) - pt) < 1e-9 * pt
def test_stationarity_kkt() -> None:
# The gradient of ||I - H F||^2 + alpha ||F||^2 is H^H (H F - I) + alpha F; it vanishes at the optimum.
rng = random.Random(2)
for k, m in [(2, 2), (3, 4), (4, 8)]:
h = rand_h(rng, k, m)
pt, n0 = 5.0, 0.7
alpha = k * n0 / pt
_, _, f = rzf_precoder(h, pt, n0)
grad = cbb.add(cbb.matmul(cbb.herm(h), cbb.sub(cbb.matmul(h, f), cbb.eye(k))), cbb.scale(alpha, f))
assert max_abs(grad) < 1e-9
def test_perturbations_increase_the_mse() -> None:
rng = random.Random(3)
h = rand_h(rng, 3, 4)
pt, n0 = 4.0, 1.0
_, _, f = rzf_precoder(h, pt, n0)
best = sum_mse(h, f, pt, n0)
for _ in range(200):
d = [[cbb.cn(rng, 1e-2) for _ in range(3)] for _ in range(4)]
assert sum_mse(h, cbb.add(f, d), pt, n0) >= best - 1e-12
def test_grid_search_real_two_users() -> None:
# The sum MSE separates over the columns of F. For a real 2 by 2 channel,
# a grid over each real column finds no better value than the closed form.
rng = random.Random(4)
for _ in range(3):
h = [[rng.gauss(0, 1) for _ in range(2)] for _ in range(2)]
pt, n0 = 3.0, 1.0
alpha = 2 * n0 / pt
_, _, f = rzf_precoder(h, pt, n0)
best = sum_mse(h, f, pt, n0)
grid_total = 0.0
for k in range(2):
fk = [f[0][k].real, f[1][k].real]
col_best = math.inf
for i in range(-60, 61):
for j in range(-60, 61):
a, b = fk[0] + i * 0.02, fk[1] + j * 0.02
e0 = (1 if k == 0 else 0) - (h[0][0] * a + h[0][1] * b)
e1 = (1 if k == 1 else 0) - (h[1][0] * a + h[1][1] * b)
col_best = min(col_best, e0 * e0 + e1 * e1 + alpha * (a * a + b * b))
grid_total += col_best
assert best <= grid_total + 1e-12
assert grid_total - best < 1e-3
def test_minimum_mse_closed_form() -> None:
# The minimum is alpha tr((H H^H + alpha I)^(-1)).
rng = random.Random(5)
for k, m in [(2, 2), (3, 6), (5, 5)]:
h = rand_h(rng, k, m)
pt, n0 = 8.0, 1.0
alpha = k * n0 / pt
_, _, f = rzf_precoder(h, pt, n0)
g = cbb.matmul(h, cbb.herm(h))
for i in range(k):
g[i][i] += alpha
gi = cbb.inv(g)
want = alpha * sum(gi[i][i].real for i in range(k))
assert abs(sum_mse(h, f, pt, n0) - want) < 1e-10
def test_limits_zero_forcing_and_matched_beams() -> None:
rng = random.Random(6)
h = rand_h(rng, 3, 4)
hh = cbb.herm(h)
# alpha -> 0: H W is diagonal (zero forcing with a common scale).
w, _, _ = rzf_precoder(h, 1.0, 1.0, alpha=1e-10)
e = cbb.matmul(h, w)
assert max(abs(e[i][j]) for i in range(3) for j in range(3) if i != j) < 1e-8
assert max(abs(e[i][i] - e[0][0]) for i in range(3)) < 1e-8
# alpha -> infinity: W is proportional to H^H.
w, _, _ = rzf_precoder(h, 1.0, 1.0, alpha=1e10)
s = math.sqrt(1.0 / cbb.norm2(hh))
assert max_abs(cbb.sub(w, cbb.scale(s, hh))) < 1e-8
def test_beats_channel_inversion_on_average() -> None:
# With K = M = 4 in Rayleigh fading, channel inversion has a poor average SNR, and RZF is much better.
rng = random.Random(7)
t, pt, n0 = 100, 10.0, 1.0
rzf = zf = 0.0
for _ in range(t):
h = rand_h(rng, 4, 4)
w, _, _ = rzf_precoder(h, pt, n0)
rzf += sum_rate(h, w, n0)
w, _, _ = rzf_precoder(h, pt, n0, alpha=1e-12)
zf += sum_rate(h, w, n0)
assert rzf / t > zf / t + 1.0
History
Linear transmit filters that minimize an MSE were studied for multiuser and MIMO systems in the early 2000s. Peel, Hochwald and Swindlehurst (2005) showed that plain channel inversion has a poor sum rate when the number of users equals the number of antennas, and proposed the regularized inverse with , which they found to maximize the SINR in a large system. In the same year Joham, Utschick and Nossek gave a unified treatment of linear transmit processing and derived the same filter as the transmit Wiener filter. Later work by many groups analyzed RZF with random matrix theory for large arrays and imperfect channel knowledge.
References
- Christian B. Peel, Bertrand M. Hochwald and A. Lee Swindlehurst, A vector-perturbation technique for near-capacity multiantenna multiuser communication, Part I: channel inversion and regularization, IEEE Transactions on Communications 53(1), 195-202, 2005, the regularized inverse H^H (H H^H + alpha I)^(-1), the choice alpha = K / rho and its sum rate compared with channel inversion
- Michael Joham, Wolfgang Utschick and Josef A. Nossek, Linear transmit processing in MIMO communications systems, IEEE Transactions on Signal Processing 53(8), 2700-2712, 2005, the transmit Wiener filter, which minimizes the MSE under a total power constraint with a common receive gain
- Bertrand M. Hochwald, Christian B. Peel and A. Lee Swindlehurst, A vector-perturbation technique for near-capacity multiantenna multiuser communication, Part II: perturbation, IEEE Transactions on Communications 53(3), 537-544, 2005, the regularized form of vector perturbation, which applies the same inverse after the perturbation
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 E77HBP Edit this page History Report an error Markdown