Inside 4G, 5G and Wi-Fi
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
عن هذا الدرس
4G, 5G and Wi-Fi are all OFDM underneath, organised as a grid of time and frequency. Follow one 5G NR slot at 30 kHz spacing: 2 resource blocks of 12 subcarriers by 14 symbols, handed to two phones by the scheduler, with reference signals, 64-QAM and LDPC coding. Count the bits (468 per block per slot), send one column through an inverse FFT and a real echo, undo it at the phone, and scale it to 255.5 Mbit/s per stream on a 100 MHz carrier. Then see how Wi-Fi 6 builds the same grid with finer squares. It builds on the OFDM lesson (subcarriers, IFFT, cyclic prefix, one-tap equaliser) and the QAM lesson, and does not re-teach them.
Time and frequency make a grid
4G, 5G and Wi-Fi all use OFDM: many subcarriers sent side by side. So the base station sees its channel as a grid. Each column is one OFDM symbol in time; each row is one subcarrier. One square is a resource element.
OFDM (see the OFDM lesson):
N subcarriers, Δf apart, sent at once
one inverse FFT builds each OFDM symbol
the resource grid
across = time, one OFDM symbol per column
down = frequency, one subcarrier per row
square = resource element (RE):
one subcarrier for one symbol,
carries one QAM symbol
the cursor shows the symbols leaving in turnاقرأ الدرس خطوة بخطوة
Time and frequency make a grid
4G, 5G and Wi-Fi all use OFDM: many subcarriers sent side by side. So the base station sees its channel as a grid. Each column is one OFDM symbol in time; each row is one subcarrier. One square is a resource element.
OFDM (see the OFDM lesson): N subcarriers, Δf apart, sent at once one inverse FFT builds each OFDM symbol the resource grid across = time, one OFDM symbol per column down = frequency, one subcarrier per row square = resource element (RE): one subcarrier for one symbol, carries one QAM symbol the cursor shows the symbols leaving in turnResource blocks and slots
In 5G NR, 12 subcarriers in a row make a resource block, and 14 OFDM symbols make a slot. One block for one slot is 12 × 14 = 168 resource elements. This grid is two blocks tall: 336 squares.
resource block (RB) = 12 consecutive subcarriers (TS 38.211 §4.4.4.1) slot = 14 OFDM symbols, normal cyclic prefix (TS 38.211 Table 4.3.2-1) one RB × one slot = 12 × 14 = 168 REs drawn here: 2 RBs = 24 subcarriers 2 × 168 = 336 REsNumerology: Δf = 15·2^μ kHz
5G picks a subcarrier spacing Δf = 15·2^μ kHz, and a symbol lasts 1/Δf. Here μ = 1: 30 kHz, so a symbol lasts 33.33 µs and a 14-symbol slot 0.5 ms. LTE always uses 15 kHz, like μ = 0.
μ Δf symbol 1/Δf slot 0 15 kHz 66.67 µs 1 ms (as LTE) 1 30 kHz 33.33 µs 0.5 ms <- here 2 60 kHz 16.67 µs 0.25 ms 3 120 kHz 8.33 µs 0.125 ms (mmWave, FR2) double the spacing: half the symbol, half the slot 1/Δf keeps the subcarriers orthogonal plot: each peak sits on the others' zerosThe guard shrinks with it
Each symbol gets a cyclic prefix, scaled the same way: 4.69 µs at 15 kHz, 2.34 µs at 30 kHz. Light travels 703 m in 2.34 µs, so echoes up to 703 m longer than the direct path stay inside the guard.
N_CP = 144κ·2^−μ·Tc (TS 38.211 §5.3.1) Tc = 1/(480 kHz × 4096), κ = 64 μ = 0: 4.69 µs (symbol 66.67 µs) μ = 1: 2.34 µs (symbol 33.33 µs) +0.52 µs on the first symbol of each 0.5 ms check μ = 1: 14 × (33.33 + 2.34) + 0.52 = 500.00 µs = one 0.5 ms slot 2.34 µs × c = 703 m of extra path plot: the same column at both spacingsThe scheduler hands out blocks
Every slot (here every 0.5 ms) the scheduler decides who gets which blocks. This slot, block 0 goes to your phone and block 1 to another phone. In the next slot it can decide again, so many users share one channel.
downlink scheduling, once per slot: RB 0 -> your phone RB 1 -> the other phone this is OFDMA: users share by frequency (and by time, slot after slot) 0.5 ms later the scheduler may move you, give you more blocks, or give you noneReference signals: squares the phone knows
Some squares carry symbols your phone already knows: reference signals (DMRS). Here the third symbol of the slot holds them, 12 per block. Comparing what arrives with what it expected tells the phone the channel H on each subcarrier.
DMRS = demodulation reference signal known symbols at known squares here: symbol l = 2 (the third), all 12 subcarriers (an example layout; 5G allows several) received / known = H[k] on that subcarrier data REs per block per slot: 168 − 12 = 15664-QAM: 6 bits per square
Your phone reports how clean its signal is. A clean signal gets 64-QAM: 6 bits per square. The 72 bits of "Hello, 5G" fill one column of your block. In a slot your 156 data squares carry 156 × 6 = 936 bits.
64-QAM, TS 38.211 §5.1.5, s = 1 − 2b: I = s0·(4 − s2·(2 − s4)) / √42 Q = s1·(4 − s3·(2 − s5)) / √42 "Hello, 5G" = 9 bytes = 72 bits = 12 symbols = one column of your block subcarrier 3: X = −0.77+0.77j per block per slot: 156 REs × 6 bits = 936 coded bits noisier signal -> 16-QAM (4) or QPSK (2)LDPC coding adds spare bits
Before mapping, 5G protects data with an LDPC code; 4G LTE used turbo codes. At code rate 1/2 in this example, half of the 936 bits are check bits. That leaves 468 bits of your data per block per slot.
5G NR data channels: LDPC (TS 38.212 Table 5.3-1) 5G NR control: polar codes 4G LTE data: turbo codes code rate R = data bits / coded bits here R = 1/2 (an example) 936 × 1/2 = 468 data bits the scheduler picks QAM order and R together from the phone's report (link adaptation) LDPC in depth: "Stronger codes" lessonColumn by column into the air
Each column goes through an inverse FFT, gets its cyclic prefix and leaves the antenna as one OFDM symbol. 14 symbols leave in 0.5 ms. The column also carries the other phone's block, on different subcarriers.
import numpy as np b = np.unpackbits(np.frombuffer(b"Hello, 5G", np.uint8)).reshape(-1, 6).astype(int) s = 1 - 2*b # bit 0 -> +1, 1 -> -1 X = (s[:,0]*(4 - s[:,2]*(2 - s[:,4])) + 1j*s[:,1]*(4 - s[:,3]*(2 - s[:,5]))) / np.sqrt(42) F = np.zeros(4096, complex); F[np.arange(-12, 0)] = X # your 12 subcarriers x = np.fft.ifft(F) # one OFDM symbol: 4096 samples tx = np.r_[x[-288:], x] # cyclic prefix: 288 samples = 2.34 µs 100 MHz at 30 kHz: 4096-point FFT, 4096 × 30 kHz = 122.88 million samples/s prefix: 288 samples = 2.34 µs (Python 3 with numpy)Your phone undoes the channel
An echo 300 m longer turns and scales each subcarrier: Y = H·X. Your phone measured H on the reference squares, so it divides, X̂ = Y/H. Every point lands back on 64-QAM, and LDPC decoding returns your bits.
echo: gain 0.4, 1 µs late (300 m further) 1 µs < prefix 2.34 µs ✓ H[k] = 1 + 0.4·e^(−j2π·k'·30 kHz·1 µs) subcarrier 3: X = −0.77+0.77j H = 0.95+0.4j Y = H·X = −1.04+0.43j X̂ = Y / H = −0.77+0.77j then FFT -> divide -> demap -> LDPC decode (no noise in this example)From one block to a gigabit
A 100 MHz carrier at 30 kHz holds 273 blocks. 273 × 468 bits every 0.5 ms is 255.5 Mbit/s. Four antennas send four streams at once (MIMO layers): about 1022 Mbit/s.
100 MHz at 30 kHz: 273 RBs (TS 38.101-1) 273 × 468 bits / 0.5 ms = 255.5 Mbit/s × 4 MIMO layers ≈ 1022 Mbit/s TS 38.306 peak formula, same carrier: 4 layers · 256-QAM · R 948/1024 · 273·12 REs per 1/28 ms · (1 − 0.14) ≈ 2337 Mbit/s >>> 273 * 468 / 0.5e-3 / 1e6 255.528Wi-Fi 6: same grid, finer squares
Wi-Fi 6 builds the same grid with 78.125 kHz spacing: 12.8 µs symbols plus a 0.8, 1.6 or 3.2 µs guard, 256 subcarriers in 20 MHz. Its access point hands out resource units of 26 tones or more, like 5G's blocks.
5G NR (here) Wi-Fi 6 spacing 30 kHz 78.125 kHz symbol 33.33 µs 12.8 µs guard 2.34 µs 0.8 / 1.6 / 3.2 µs unit RB, 12 subc. RU, 26 tones and up who shares scheduler access point (OFDMA) 20 MHz / 78.125 kHz = 256 subcarriers LTE: 15 kHz spacing, the same as 5G's μ = 0
أسئلة سريعة: 5
اختر إجابة واحدة لكل سؤال. يمكنك تغيير اختياراتك قبل التحقق منها.
01A 5G NR carrier uses μ = 2. What are its subcarrier spacing and its slot length?
Δf = 15·2^μ kHz = 15·4 = 60 kHz. A symbol lasts 1/Δf, so it is four times shorter than at 15 kHz, and the 14-symbol slot shrinks from 1 ms to 0.25 ms.
02How many resource elements does one resource block hold in one slot?
A resource block is 12 subcarriers and a slot is 14 OFDM symbols, so 12 × 14 = 168 squares. In this lesson 12 of them carry reference signals, leaving 156 for data.
03A block has 156 data squares, 16-QAM (4 bits per square) and code rate 1/2. How many data bits does it carry per slot?
156 × 4 = 624 coded bits, and half of them are check bits at rate 1/2, so 312 data bits. With 64-QAM the same block carries 468: a cleaner signal buys more bits per square.
04Why can the phone undo an echo with one division per subcarrier, X̂ = Y/H?
An echo 300 m longer arrives 1 µs late, inside the 2.34 µs prefix. Then the channel is a circular convolution and Y[k] = H[k]·X[k]. The reference signals tell the phone H[k], so it divides.
05What does Wi-Fi 6 change compared with older Wi-Fi to look more like 5G?
Wi-Fi 6 packs four times as many subcarriers into each channel (78.125 kHz spacing, 12.8 µs symbols), and its access point assigns resource units of 26 tones and up to different stations, much as a 5G scheduler assigns resource blocks.
المسرد
- Resource element
- One square of the time-frequency grid: one subcarrier for one OFDM symbol. It carries one QAM symbol.
- Resource block
- In 5G NR, 12 consecutive subcarriers. With 14 symbols of a slot it holds 168 resource elements.
- Slot
- 14 OFDM symbols in 5G NR with the normal cyclic prefix; 1 ms at 15 kHz spacing, 0.5 ms at 30 kHz.
- Numerology
- The choice of subcarrier spacing in 5G NR, Δf = 15·2^μ kHz; symbol, prefix and slot lengths all scale by 1/2^μ.
- Scheduler
- The part of the base station that decides, every slot, which resource blocks each user gets and with what QAM order and code rate.
- DMRS
- Demodulation reference signal: known symbols placed in the grid so the phone can measure the channel H on each subcarrier.
- LDPC code
- Low-density parity-check code: the error-correcting code 5G NR uses for its data channels.
- OFDMA
- Sharing an OFDM channel among users by giving each one different subcarriers (and slots).
الملاحظات والمصادر
- The slot, the two blocks, the DMRS position, the code rate 1/2 and the echo are chosen examples; spacings, prefix lengths, the 12-subcarrier block, 14-symbol slot, 64-QAM mapping and 273 blocks in 100 MHz are from the 3GPP specifications. Every number and curve in the figure is computed from this model.
- Real slots also give the first one to three symbols to control (PDCCH), add phase-tracking signals and leave guard bands at the edges, so real throughput is lower than this count.
- The motion is slowed down enormously: a whole slot lasts 0.5 ms.
- 3GPP TS 38.211 V16.2.0 (ETSI TS 138 211), NR physical channels and modulation: numerologies, 14-symbol slots, 12-subcarrier resource blocks, cyclic prefix, 64QAM
- 3GPP TS 38.212 V16.2.0 (ETSI TS 138 212), NR multiplexing and channel coding: LDPC for data, polar codes for control
- 3GPP TS 38.101-1 V16.4.0 (ETSI TS 138 101-1), UE radio transmission and reception, FR1: Table 5.3.2-1, 273 RBs in 100 MHz at 30 kHz
- 3GPP TS 38.306 V16.1.0 (ETSI TS 138 306), UE radio access capabilities: §4.1.2 max data rate
- 5G NR (Wikipedia): subcarrier spacings and slot lengths, 15 kHz the same as LTE
- Wi-Fi 6 (Wikipedia): 78.125 kHz subcarriers, 12.8 µs symbols, guard intervals, resource units, OFDMA
- LTE (Wikipedia): OFDMA downlink, SC-FDMA uplink, 1.4 to 20 MHz
- Turbo code (Wikipedia): used in 3G/4G mobile communications such as LTE
- A. V. Oppenheim, R. W. Schafer, J. R. Buck, Discrete-Time Signal Processing, 2nd ed. (course text on MIT OCW 6.341): the DFT
- J. G. Proakis, Digital Communications, 3rd ed., McGraw-Hill, 1995 (Internet Archive record)
- MIT OpenCourseWare 6.450 Principles of Digital Communications I (R. Gallager, L. Zheng)
- MIT OpenCourseWare 6.02 Digital Communication Systems (H. Balakrishnan, G. Verghese)
- NumPy documentation: numpy.fft.ifft
اختبار يتاح بعد الخطوة الأخيرة.