ENع
←4G, 5G, Wi-Fi
Lesson S5 · Special topics

Inside 4G, 5G and Wi-Fi

20 min12 steps5 questionsAdvanced
About this lesson

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.

You'll learn to

Tick what you feel confident about. These self-checks do not affect your lesson score.

Fig S5 · Interactive
01 / 12

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
Loading figure…
or ← →
Read the lesson step by step
  1. 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
  2. Resource 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 REs
  3. Numerology: Δ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' zeros
  4. The 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 spacings
  5. The 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 none
  6. Reference 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 = 156
  7. 64-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)
  8. 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" lesson
  9. Column 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)
  10. 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)
  11. 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.528
  12. Wi-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

Quiz Unlocks after the last step.