Algorithmcore
Selected mapping
Also called SLM.
Lowers the PAPR of OFDM by forming U phase-rotated copies of a symbol and sending the one with the lowest peak, plus its index. No distortion; costs U inverse FFTs.
- Time
- O(U L N log(L N)) worst
- Space
- O(L N) extra
- Where
- L = the oversampling factor; N = the number of subcarriers; U = the number of phase sequences
- Model
- Real RAM
- Properties
- deterministicdistortionlessnever worse than plain ofdmside information
- Evidence
- Proof sketchCode in 1 languages
- Origin
- R. W. Bäuml, Robert F. H. Fischer, Johannes B. Huber, 1996
Selected mapping (SLM) lowers the peak-to-average power ratio (PAPR) of an OFDM symbol without distorting it. The transmitter and the receiver share phase sequences of length whose entries have magnitude 1. For each data block the transmitter forms the candidates , computes the PAPR of each one with an inverse FFT, and sends the candidate with the lowest PAPR together with its index, bits of side information. The receiver multiplies each subcarrier by and gets back exactly. Bäuml, Fischer and Huber proposed it in 1996. It differs from partial transmit sequences, which rotate whole blocks of subcarriers and need only one inverse FFT per block, and from clipping and filtering, which needs no side information but adds distortion. The page uses the unitary DFT pair , and is the imaginary unit.
In plain words
The same data can be sent in several ways that the receiver can undo. For example, the sender can turn some symbols by a quarter turn, if the receiver knows which ones. Each way gives a different signal in time, and their peaks differ, because the peaks come from chance alignments of the tones. So the sender tries a fixed list of patterns, looks at the highest peak of each signal, and sends the best one. It also tells the receiver which pattern it chose. The receiver turns the symbols back. Nothing is lost or distorted. The cost is the extra work at the sender, one transform per pattern, and a few bits to name the pattern. If those bits arrive wrong, the whole symbol is lost.
The problem
The input is a block of data symbols , for example QPSK with , an oversampling factor , usually 4, and a table of phase sequences known to both ends. The output is an index and the oversampled OFDM symbol of , such that
- its PAPR is the smallest among the candidates, and
- the receiver can recover exactly from the subcarrier values and .
The first sequence is all ones, so plain OFDM is one of the candidates.
The algorithm
SLM(X[0..N-1], P[1..U][0..N-1], L)- 1
for u ← 1 to U - 2
X_u[k] ← X[k] · P_u[k] for every k ▷ |P_u[k]| = 1, P_1 is all ones - 3
x_u ← √L · F_LNᴴ (X_u with (L-1)N zeros in the middle) - 4
r_u ← max_m |x_u[m]|² / mean_m |x_u[m]|² - 5
if u = 1 or r_u < r_{u*} then u* ← u - 6
return u*, x_{u*} ▷ send x_{u*} and the index u* (log₂ U bits)
Line L2 rotates each subcarrier. A common table uses entries from , so that the product is a sign change or a swap of the real and imaginary parts and needs no multiplication. Line L3 is the inverse FFT of size that builds the candidate oversampled by ; the zeros go in the middle of the spectrum because the indices are the negative frequencies. Line L4 measures the PAPR, and line L5 keeps the first candidate with the smallest value. Line L6 sends it. The receiver demodulates as usual, equalizes, and computes .
Example
Take QPSK subcarriers and . For one block (Python random.Random(1)) and a table of sequences, the first all ones and three random ones from , the four candidates have the PAPRs 6.94 dB, 7.47 dB, 6.66 dB and 6.39 dB. SLM sends the fourth candidate, 0.55 dB below plain OFDM, and the index 4 in 2 bits.
Over 500 random blocks (random.Random(3), a fixed table of 16 sequences, and for each the first of them):
| mean PAPR | 99 percent of blocks below | ||||
|---|---|---|---|---|---|
| 1 | 7.50 dB | 9.92 dB | 0.638 | 0.250 | 0.638 |
| 2 | 6.92 dB | 8.50 dB | 0.402 | 0.048 | 0.407 |
| 4 | 6.52 dB | 7.72 dB | 0.164 | 0.004 | 0.166 |
| 8 | 6.23 dB | 7.13 dB | 0.020 | none in 500 | 0.028 |
| 16 | 5.98 dB | 6.76 dB | none in 500 | none in 500 | 0.0008 |
The last column is the rule , with the measured probability for one candidate at 7 dB. It fits the measured column at 7 dB well here. Going from 1 to 16 candidates moves the 99 percent point down by 3.2 dB; each doubling of gains less than the one before.
Correctness
The claim has three parts. The loop keeps, as its invariant, the first index with the smallest PAPR seen so far, so line L6 returns the best candidate in the table. Because is all ones, the output PAPR is never above that of plain OFDM. Because , the receiver's product returns exactly. For QPSK data and phases in , each candidate on its own has exactly the PAPR distribution of plain OFDM, since a quarter turn maps the QPSK set onto itself. The CCDF of the minimum would follow if the candidates were independent; they are not, so is a rule, not a theorem. The full proof is in proofs/correctness.md.
Proof: Selected mapping sends the candidate with the lowest PAPR, never does worse than plain OFDM, and the receiver recovers the data exactlyfull
Let be the data, the phase sequences with for all and , and . Write for the elementwise product of line L2, for its oversampled symbol of line L3 and for its PAPR of line L4. We work in exact arithmetic.
Lemma 1 (loop invariant). After the iteration of line L1 for index , the stored index satisfies , and is the smallest index that reaches this minimum.
Proof. By induction on . For the test of line L5 stores index 1. If the claim holds after , line L5 replaces by exactly when , that is, when is smaller than all earlier values. If equals the minimum, the earlier, smaller index stays.
Theorem 1 (the choice). Line L6 returns an index with and the symbol . In particular , the PAPR of plain OFDM of , and adding sequences to the table never raises the PAPR of the output.
Proof. Lemma 1 at . Since is all ones, is the plain OFDM symbol. A table that contains the first sequences of a larger table takes the minimum over fewer values, which cannot be smaller.
Theorem 2 (exact recovery). If the receiver gets the subcarrier values (an ideal channel, or after a perfect one-tap equalizer) and the index , then for every .
Proof. .
Recovering the subcarrier values from the transmitted samples is the OFDM demodulator: the oversampled symbol has the values in its in-band bins, and the forward FFT returns them.
Lemma 3 (each candidate is distributed as plain OFDM). If the are i.i.d. and uniform on the QPSK points , and every is in , then for each fixed the vector has the same distribution as , so has the same distribution as .
Proof. Multiplication by maps the QPSK set onto itself and is a bijection. So for a fixed , each is uniform on the QPSK set, and the components stay independent because each one depends only on its own .
A rule, not a theorem. Let . Lemma 3 gives for each , and Theorem 1 gives
If the ratios were independent, the probability would be . They are not independent, since all candidates come from the same ; the value is the usual design rule, and a simulation is needed to check it for a given table.
Complexity
Each candidate costs one inverse FFT of size and work for the PAPR, so one block costs operations in the real-RAM model, times the cost of measuring the PAPR of plain OFDM. The memory is beyond the table, if only the best candidate so far is kept. The side information is bits per OFDM symbol: 4 bits for against 128 data bits for 64 QPSK subcarriers.
Properties
- Distortionless. The data reach the receiver unchanged; there is no in-band error and no spectral regrowth.
- Never worse than OFDM. With all ones, the PAPR of the output is at most that of plain OFDM for every block.
- Monotone in . A larger table that contains a smaller one never gives a higher PAPR.
- Side information. The index must reach the receiver without error. An error in it corrupts every subcarrier of the symbol.
- Statistical, not guaranteed. SLM lowers the probability of a high peak. It does not bound the peak: in the worst case all candidates can have a high PAPR.
- Any constellation. The method does not depend on the constellation, as long as the receiver can undo the rotation.
Variants and improvements
- Structured tables. Rows of a Hadamard matrix (entries , see the Walsh-Hadamard transform) or other fixed sets are used instead of random sequences. A sequence that is a constant multiple of another, such as , gives the same PAPR and wastes a candidate.
- Blind SLM. The receiver finds the index without side information, for example by a maximum likelihood search over the candidates, using the fact that only one of them gives valid constellation points.
- Embedded side information. The index is carried by the phase sequences themselves, for example on pilot or reserved subcarriers.
- Fewer transforms. Some versions split the inverse FFT into stages and apply the phase sequences in the middle, so that the candidates share part of the work.
- Other criteria. The selection can minimize a quantity other than the PAPR, such as the energy above a clipping level, which tracks the distortion of the amplifier more closely.
- Sub-block rotation. Partial transmit sequences restrict the phases to be constant on blocks of subcarriers, which reduces the number of inverse FFTs and the side information for a given number of candidates.
When to use it
Use SLM when the link can carry a few bits of protected side information per symbol, the transmitter can afford inverse FFTs, and no in-band distortion is acceptable, for example with dense QAM. A table of 4 to 16 sequences gives most of the practical gain. For a mobile uplink with a tight power budget, a waveform with a low PAPR by design, such as SC-FDMA, is the usual choice instead.
Pitfalls
- Selecting at the Nyquist rate. Line L3 with ranks the candidates by their samples only, and the selected candidate can still have a high peak between samples. Use in line L3.
- Leaving out plain OFDM. A table whose first sequence is not all ones loses the guarantee that SLM is never worse than plain OFDM. Keep in the table used by line L2.
- Phases that are not of magnitude 1. Line L2 with changes the energy per subcarrier, and the division at the receiver amplifies the noise. Use unit-magnitude entries.
- Pilots inside the rotation. If line L2 also rotates the pilot subcarriers, the receiver must know before it can estimate the channel. Set on the pilots, or make the index readable before channel estimation.
- Unprotected index. Sending uncoded makes the symbol error rate at least the error rate of the index. Protect the index with strong coding or repetition.
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/selected-mapping/. The authors are listed in prov/GWPD9C.jsonl.
"""Selected mapping (SLM) for the PAPR of OFDM (Bauml, Fischer and Huber 1996).
The transmitter and the receiver share U phase sequences P_1, ..., P_U of
length N with entries of magnitude 1; P_1 is all ones, so plain OFDM is one of
the candidates. The transmitter multiplies the data X by each P_u, builds each
candidate symbol oversampled by L, and sends the one with the lowest PAPR and
its index. The receiver divides by the chosen sequence, which is exact because
|P_u[k]| = 1. The FFT is a radix-2 FFT, so N and L must be powers of two.
"""
import cmath
import math
import random
from typing import Sequence
def fft(a: Sequence[complex], inverse: bool = False) -> list[complex]:
"""Radix-2 FFT with no scale factor: sum_n a[n] e^(-+ j 2 pi k n / n_len)."""
n = len(a)
if n == 0 or n & (n - 1):
raise ValueError("the length must be a power of two")
out = [complex(v) for v in a]
j = 0
for i in range(1, n):
bit = n >> 1
while j & bit:
j ^= bit
bit >>= 1
j |= bit
if i < j:
out[i], out[j] = out[j], out[i]
sign = 1 if inverse else -1
size = 2
while size <= n:
half = size // 2
tw = [cmath.exp(sign * 2j * math.pi * k / size) for k in range(half)]
for s in range(0, n, size):
for k in range(half):
u = out[s + k]
v = out[s + k + half] * tw[k]
out[s + k] = u + v
out[s + k + half] = u - v
size *= 2
return out
def to_time(X: Sequence[complex], L: int) -> list[complex]:
"""sqrt(L) F^H Z: the OFDM symbol of X oversampled by L, zeros in the middle of the spectrum."""
n = len(X)
z = [0j] * (L * n)
z[: n // 2] = [complex(v) for v in X[: n // 2]]
z[L * n - n + n // 2:] = [complex(v) for v in X[n // 2:]]
s = 1.0 / math.sqrt(n)
return [v * s for v in fft(z, inverse=True)]
def to_bins(x: Sequence[complex], L: int) -> list[complex]:
"""The N in-band subcarrier values of an oversampled symbol: the inverse of to_time."""
n = len(x) // L
c = fft(x)
s = 1.0 / (L * math.sqrt(n))
return [v * s for v in c[: n // 2] + c[L * n - n // 2:]]
def papr(x: Sequence[complex]) -> float:
"""max |x[m]|^2 over the time average of |x[m]|^2."""
p = [abs(v) ** 2 for v in x]
return max(p) / (sum(p) / len(p))
def phase_table(u: int, n: int, seed: int) -> list[list[complex]]:
"""U phase sequences with entries in {1, -1, j, -j}; the first is all ones."""
rng = random.Random(seed)
table = [[1 + 0j] * n]
for _ in range(u - 1):
table.append([rng.choice((1 + 0j, -1 + 0j, 1j, -1j)) for _ in range(n)])
return table
def selected_mapping(X: Sequence[complex], table: Sequence[Sequence[complex]], L: int = 4) -> tuple[int, list[complex], list[float]]:
"""Return the chosen index u (0-based), its oversampled symbol and the PAPR of every candidate."""
best, best_x, ratios = -1, None, []
for u, p in enumerate(table): # @line L1
xu = [a * b for a, b in zip(X, p)] # @line L2
x = to_time(xu, L) # @line L3
r = papr(x) # @line L4
ratios.append(r)
if best < 0 or r < ratios[best]: # @line L5
best, best_x = u, x
return best, best_x, ratios # @line L6
def slm_receive(Y: Sequence[complex], table: Sequence[Sequence[complex]], u: int) -> list[complex]:
"""Undo the phase sequence u on the equalized subcarrier values Y."""
return [y * p.conjugate() for y, p in zip(Y, table[u])]
test_selected_mapping.py 77 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/selected-mapping/. The authors are listed in prov/GWPD9C.jsonl.
import cmath
import math
import random
from selected_mapping import fft, papr, phase_table, selected_mapping, slm_receive, to_bins, to_time
QPSK = [complex(a, b) / math.sqrt(2) for a in (1, -1) for b in (1, -1)]
def block(rng, n=64):
return [rng.choice(QPSK) for _ in range(n)]
def direct_time(X, L):
"""The oversampled OFDM symbol from its definition."""
n = len(X)
freqs = list(range(n // 2)) + list(range(-(n // 2), 0))
return [sum(X[i] * cmath.exp(2j * math.pi * f * m / (L * n)) for i, f in enumerate(freqs)) / math.sqrt(n) for m in range(L * n)]
def test_fft_and_oversampled_symbol():
rng = random.Random(1)
X = block(rng, 16)
assert max(abs(a - b) for a, b in zip(to_time(X, 2), direct_time(X, 2))) < 1e-9
assert max(abs(a - 16 * b) for a, b in zip(fft(fft(X), inverse=True), X)) < 1e-9
def test_table_shape():
t = phase_table(8, 32, 9)
assert len(t) == 8 and all(len(r) == 32 for r in t)
assert all(v == 1 for v in t[0])
assert all(v in (1, -1, 1j, -1j) for r in t for v in r)
def test_choice_matches_brute_force():
rng = random.Random(2)
table = phase_table(6, 16, 3)
for _ in range(20):
X = block(rng, 16)
u, x, ratios = selected_mapping(X, table, 4)
brute = [papr(direct_time([a * b for a, b in zip(X, p)], 4)) for p in table]
assert max(abs(a - b) for a, b in zip(ratios, brute)) < 1e-9
assert u == min(range(6), key=lambda i: (brute[i], i))
assert abs(papr(x) - min(brute)) < 1e-9
def test_one_candidate_is_plain_ofdm():
rng = random.Random(4)
X = block(rng)
u, x, _ = selected_mapping(X, phase_table(1, 64, 0), 4)
assert u == 0
assert max(abs(a - b) for a, b in zip(x, to_time(X, 4))) < 1e-12
def test_round_trip_recovers_the_data():
rng = random.Random(5)
table = phase_table(8, 64, 7)
for _ in range(10):
X = block(rng)
u, x, _ = selected_mapping(X, table, 4)
assert max(abs(a - b) for a, b in zip(slm_receive(to_bins(x, 4), table, u), X)) < 1e-9
def test_more_candidates_never_hurt():
rng = random.Random(6)
table = phase_table(8, 64, 11)
gains = []
for _ in range(40):
X = block(rng)
_, _, r = selected_mapping(X, table, 4)
best = [min(r[:u]) for u in range(1, 9)]
assert all(best[i + 1] <= best[i] for i in range(7))
gains.append(10 * math.log10(r[0] / best[-1]))
assert sum(gains) / len(gains) > 1.0
History
Bäuml, Fischer and Huber introduced selected mapping in 1996. In 1997 Müller and Huber published the related method of partial transmit sequences. The idea, choosing among several representations of the same data, does not depend on the constellation or on the number of subcarriers. The overview of Han and Lee (2005) compares it with the other PAPR methods by the reduction it gives, its side information and its cost.
References
- R. W. Bäuml, R. F. H. Fischer and J. B. Huber, Reducing the peak-to-average power ratio of multicarrier modulation by selected mapping, Electronics Letters 32(22), 1996, pages 2056 to 2057, the set of phase sequences, the choice of the candidate with the lowest PAPR and the side information
- Seung Hee Han and Jae Hong Lee, An overview of peak-to-average power ratio reduction techniques for multicarrier transmission, IEEE Wireless Communications 12(2), 2005, pages 56 to 65, the section on selected mapping, and the comparison of the methods by distortion, side information and cost
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 GWPD9C Edit this page History Report an error Markdown