OFDM Transmitter
Why OFDM Dominates Modern Wireless
OFDM converts a frequency-selective wideband channel into many flat-fading narrowband subchannels, making equalization trivial (one-tap per subcarrier). It is the modulation backbone of 4G LTE, 5G NR, Wi-Fi (802.11a/g/n/ac/ax), and digital broadcasting (DVB-T, DAB).
Definition: OFDM Symbol Generation via IFFT
OFDM Symbol Generation via IFFT
An OFDM symbol is generated by applying the -point IFFT to the frequency-domain data vector :
def ofdm_symbol(data_symbols, N_fft):
"""Generate one OFDM symbol via IFFT."""
X = np.zeros(N_fft, dtype=complex)
X[:len(data_symbols)] = data_symbols
x = np.fft.ifft(X) * np.sqrt(N_fft)
return x
The factor ensures the time-domain power equals the
frequency-domain power. NumPy's ifft uses normalization,
so we multiply by to get symmetric scaling.
Definition: Cyclic Prefix Insertion
Cyclic Prefix Insertion
The cyclic prefix (CP) copies the last samples of the OFDM symbol to the front:
The CP must be longer than the maximum channel delay to prevent inter-symbol interference (ISI).
def add_cp(x, N_cp):
"""Add cyclic prefix."""
return np.concatenate([x[-N_cp:], x])
def remove_cp(y, N_cp):
"""Remove cyclic prefix."""
return y[N_cp:]
Definition: Subcarrier Mapping and Guard Bands
Subcarrier Mapping and Guard Bands
Not all subcarriers carry data. Typical allocation:
- Data subcarriers: carry QAM symbols
- Pilot subcarriers: carry known symbols for channel estimation
- Null subcarriers: DC and guard bands (set to zero)
def subcarrier_mapping(data, pilots, pilot_idx, null_idx, N_fft):
X = np.zeros(N_fft, dtype=complex)
data_idx = [i for i in range(N_fft) if i not in pilot_idx and i not in null_idx]
X[data_idx[:len(data)]] = data
X[pilot_idx] = pilots
return X
Definition: Peak-to-Average Power Ratio (PAPR)
Peak-to-Average Power Ratio (PAPR)
The PAPR of an OFDM symbol is:
OFDM suffers from high PAPR because the IFFT sums many independent subcarriers. For subcarriers, PAPR can reach dB in the worst case.
def compute_papr(x):
"""Compute PAPR in dB."""
return 10 * np.log10(np.max(np.abs(x)**2) / np.mean(np.abs(x)**2))
Definition: Complete OFDM Transmitter Chain
Complete OFDM Transmitter Chain
The complete transmitter pipeline:
- Bit generation QAM mapping Subcarrier allocation
- IFFT CP insertion Parallel-to-serial
def ofdm_transmitter(bits, M, N_fft, N_cp, pilot_idx, null_idx):
k = int(np.log2(M))
constellation = qam_constellation(M)
n_data = N_fft - len(pilot_idx) - len(null_idx)
n_sym = len(bits) // (n_data * k)
tx_signal = []
for s in range(n_sym):
data_bits = bits[s*n_data*k:(s+1)*n_data*k]
data_syms = constellation[data_bits.reshape(-1,k).dot(1<<np.arange(k)[::-1]) % M]
X = subcarrier_mapping(data_syms, np.ones(len(pilot_idx)), pilot_idx, null_idx, N_fft)
x = np.fft.ifft(X) * np.sqrt(N_fft)
tx_signal.append(add_cp(x, N_cp))
return np.concatenate(tx_signal)
Theorem: Cyclic Prefix Enables Circular Convolution
With a cyclic prefix of length (where is the channel length), the linear convolution becomes a circular convolution over the OFDM symbol. In the frequency domain:
where is the channel frequency response. This transforms the frequency-selective channel into parallel flat-fading subchannels.
The CP makes the received signal periodic (from the channel's perspective), turning linear convolution into circular convolution, which diagonalizes in the DFT domain.
Circular convolution
After CP removal, the received block is the circular convolution of and : .
DFT diagonalization
The DFT of a circular convolution is the element-wise product of DFTs: .
Theorem: OFDM Spectral Efficiency
The spectral efficiency of OFDM with -QAM on each subcarrier is:
The first factor is the CP overhead, the second is the guard band overhead, and the third is the modulation efficiency.
Every overhead (CP, guard bands, pilots) reduces spectral efficiency. 5G NR uses for about 6% CP overhead.
Theorem: CCDF of OFDM PAPR
For large , the CCDF (complementary CDF) of the PAPR is approximately:
For , the probability that PAPR exceeds 10 dB is about 0.3%.
The time-domain OFDM samples are approximately i.i.d. complex Gaussian (by the CLT), and the PAPR is the maximum of such samples.
Example: Building a Basic OFDM Transmitter
Implement a basic OFDM transmitter with 64 subcarriers, 16-QAM, and CP length 16. Compute the PAPR.
Implementation
import numpy as np
N_fft, N_cp, M = 64, 16, 16
k = int(np.log2(M))
const = qam_constellation(M)
bits = np.random.randint(0, 2, N_fft * k)
data = const[bits.reshape(-1, k).dot(1 << np.arange(k)[::-1]) % M]
X = np.zeros(N_fft, dtype=complex)
X[:len(data)] = data
x = np.fft.ifft(X) * np.sqrt(N_fft)
x_cp = np.concatenate([x[-N_cp:], x])
papr = 10*np.log10(np.max(np.abs(x)**2) / np.mean(np.abs(x)**2))
print(f"PAPR = {papr:.2f} dB")
Example: PAPR Statistics for OFDM
Generate 10000 OFDM symbols and plot the CCDF of PAPR. Compare with the theoretical approximation.
Implementation
N_sym = 10000
paprs = np.zeros(N_sym)
for i in range(N_sym):
data = const[np.random.randint(0, M, N_fft)]
x = np.fft.ifft(data) * np.sqrt(N_fft)
paprs[i] = np.max(np.abs(x)**2) / np.mean(np.abs(x)**2)
# CCDF
gamma = np.linspace(0, 15, 200)
ccdf_sim = np.array([np.mean(10*np.log10(paprs) > g) for g in gamma])
ccdf_theory = 1 - (1 - np.exp(-10**(gamma/10)))**N_fft
Example: OFDM vs Single-Carrier: ISI Comparison
Show that a single-carrier system suffers ISI over a multipath channel while OFDM with proper CP eliminates it.
Single-carrier with ISI
h = np.array([1, 0.5, 0.3]) # 3-tap channel
sc_signal = const[np.random.randint(0, M, 100)]
sc_rx = np.convolve(sc_signal, h)[:len(sc_signal)]
# sc_rx has ISI: each sample depends on previous symbols
OFDM without ISI
# With CP >= len(h)-1 = 2, OFDM eliminates ISI
X = np.fft.fft(sc_signal, N_fft)
H = np.fft.fft(h, N_fft)
Y = H * X # no ISI: simple multiplication per subcarrier
X_hat = Y / H # one-tap equalization
OFDM Transmitter Visualization
Visualize the OFDM transmitter: frequency-domain symbols, time-domain signal after IFFT, and the effect of CP insertion.
Parameters
OFDM PAPR Analysis
Explore PAPR statistics: CCDF curves for different FFT sizes.
Parameters
OFDM Transmitter-Receiver Block Diagram
Quick Check
What is the primary purpose of the cyclic prefix in OFDM?
Reduce PAPR
Enable circular convolution and eliminate ISI
Improve spectral efficiency
Provide error correction
Correct: the CP turns linear convolution into circular convolution, which diagonalizes in the DFT domain.
Quick Check
What is the role of the IFFT in the OFDM transmitter?
Modulate each subcarrier independently
Compress the signal bandwidth
Add error protection
Equalize the channel
The IFFT converts frequency-domain symbols to an orthogonal time-domain sum of sinusoids.
Common Mistake: Inconsistent FFT/IFFT Normalization
Mistake:
Using np.fft.ifft (which divides by ) at TX and np.fft.fft
(which does not divide) at RX, causing a factor-of- power mismatch.
Correction:
Use symmetric normalization: multiply IFFT output by and
divide FFT output by , or use norm='ortho' in NumPy.
Key Takeaway
OFDM converts a wideband frequency-selective channel into parallel flat-fading subchannels via IFFT/FFT and cyclic prefix. The CP must exceed the maximum channel delay spread. The price is PAPR and CP overhead.
Why This Matters: OFDM Numerology in 5G NR
5G NR defines multiple OFDM numerologies with subcarrier spacings kHz for . Wider spacing () is used at mmWave to tolerate larger Doppler. The CP length scales inversely: shorter symbols need shorter CPs but tolerate less delay spread.
See full treatment in Chapter 25
Historical Note: The Invention of OFDM
1966-1980Robert Chang of Bell Labs proposed multicarrier modulation in 1966. Weinstein and Ebert showed in 1971 that the DFT/IDFT could implement OFDM efficiently. The addition of the cyclic prefix by Peled and Ruiz (1980) was the key insight that made OFDM practical for dispersive channels. Today, OFDM is used in virtually every broadband wireless system.
OFDM
Orthogonal Frequency Division Multiplexing: a multicarrier modulation that divides a wideband channel into many narrowband subcarriers using the IFFT/FFT.
Related: Cyclic Prefix, Subcarrier
Cyclic Prefix
A copy of the last samples prepended to each OFDM symbol to absorb multipath delay and enable circular convolution.
Related: OFDM
Subcarrier
One of the orthogonal narrowband frequency channels in an OFDM system.
PAPR
Peak-to-Average Power Ratio: the ratio of peak instantaneous power to average power, a key challenge in OFDM systems.