Codebook
Understanding Codebooks
In a MIMO system with N transmit antennas, the optimal beamforming vector is an N-dimensional complex vector matched to the channel. Feeding back this vector directly would require quantizing N complex numbers (2N real values) with sufficient precision, consuming prohibitive uplink bandwidth in FDD systems where the transmitter cannot estimate the downlink channel directly. Codebooks solve this: both the gNB and UE store the same set of candidate beamforming vectors, and the UE reports only the index of the best match, reducing feedback from hundreds of bits to a compact integer.
The challenge is designing the codebook to cover the space of possible channels efficiently. Too few entries and the best match may be far from optimal, losing beamforming gain. Too many and the feedback overhead increases while the UE search complexity grows. DFT-based codebooks exploit the structure of uniform arrays where the optimal beamforming vector for a single plane wave is always a DFT vector, regardless of the arrival angle. By sampling the DFT at regular angular intervals with oversampling, the codebook covers all possible beam directions with predictable worst-case mismatch.
Codebook Formulas
w(i) = [1, ej2πi/N, ej2π2i/N, ..., ej2π(N-1)i/N]T / √N
Type I Codebook Size:
|C| = O1N1 × O2N2 × 4 (dual-pol co-phasing)
Type II Feedback Bits:
B ≈ log2(O1N1 × O2N2) + L×(3 + S×3) bits
Where O1,O2 = oversampling (2-4), N1,N2 = elements per dimension, L = beams (2-4), S = subbands (20-50). 8x8 dual-pol, O=4: Type I = 8,192 entries; Type II with L=4, S=26: ~400 bits total.
5G NR Codebook Types
| Codebook | Resolution | Feedback | Complexity | Best For |
|---|---|---|---|---|
| Type I Single-Panel | 1 beam direction | 10 to 20 bits | Low | SU-MIMO, single path |
| Type I Multi-Panel | 1 beam per panel | 15 to 25 bits | Low | Distributed arrays |
| Type II | L=2-4 beam combination | 50 to 200 bits | High | MU-MIMO, multipath |
| Type II Port Selection | Subset of ports | 30 to 100 bits | Medium | Rel-18 overhead reduction |
| Enhanced Type II | Doppler+spatial | 100 to 400 bits | Very high | High mobility MU-MIMO |
Frequently Asked Questions
How does a DFT codebook work?
Exploits uniform array structure: optimal beam for angle θ is DFT vector with phase progression ej2πd sinθ/λ. Oversampled by O=2 to 4x for finer angular spacing. For 16×8 dual-pol, O=4: 64×32×4 = 8,192 entries. PMI selects horizontal, vertical, and co-phasing indices.
Type I vs Type II?
Type I: single beam, low feedback (10 to 20 bits), good for SU-MIMO. Type II: L=2 to 4 beam linear combination with per-subband phase, 50 to 200 bits. Type II: 5 to 15% cell-average and 10 to 20% cell-edge throughput gain in MU-MIMO. Mandatory for all UE categories but used selectively by gNB.
How does codebook affect massive MIMO?
64 elements (8×8 dual-pol), O=4: 1,024 beam directions, ~3.5° resolution. Sufficient to separate users >3.5° apart. Type II: sub-degree accuracy by combining beams with optimized coefficients. Rel-18 port selection reduces overhead by reporting only significant antenna ports.