Expand description
The numerology, the synchronisation signal block and the demodulation reference signals of 5G NR (and the numerology of LTE, its case $\mu = 0$).
§Numerology
NR scales the 15 kHz subcarrier spacing of LTE: $\Delta f = 2^{\mu} \cdot 15$ kHz,
$\mu = 0, \dots, 4$; a 10 ms frame holds ten 1 ms subframes of $2^{\mu}$ slots of 14
OFDM symbols (12 with the extended cyclic prefix, $\mu = 2$ only); a resource block
is 12 subcarriers (Lin et al. 2019, Sec. II; Astély et al. 2009 for LTE). At the
sampling rate $N_{\mathrm{FFT}}\Delta f$, the cyclic prefix of a symbol is
$144 N_{\mathrm{FFT}}/2048$ samples, and $(144 + 16 \cdot 2^{\mu}) N_{\mathrm{FFT}}/2048$
for the first symbol of every half subframe ($l = 0$ and $l = 7 \cdot 2^{\mu}$), so
that a half subframe lasts exactly 0.5 ms; the extended prefix is $512
N_{\mathrm{FFT}}/2048$ (TS 38.211, Sec. 5.3.1): 4.7 µs and 16.7 µs at $\mu = 0$, the
prefixes of LTE. Carrier::modulate maps a grid of $K = 12 N_{\mathrm{RB}}$
subcarriers, the subcarrier $k$ at the frequency $(k - K/2)\Delta f$, and prepends the
prefixes; Carrier::demodulate removes them and gives the grid back.
§Synchronisation signal block
The SSB occupies 4 OFDM symbols and 240 subcarriers (20 resource blocks): the primary synchronisation signal (PSS) on symbol 0, subcarriers 56 to 182; the secondary (SSS) on symbol 2, same subcarriers; the broadcast channel (PBCH) on symbols 1 and 3 and on subcarriers 0–47 and 192–239 of symbol 2, with its demodulation reference signal (DMRS) on one subcarrier in four, offset by $\nu = N_{\mathrm{ID}}^{\mathrm{cell}} \bmod 4$. The 1008 cell identities are $N_{\mathrm{ID}}^{\mathrm{cell}} = 3 N_{\mathrm{ID}}^{(1)} + N_{\mathrm{ID}}^{(2)}$, $N_{\mathrm{ID}}^{(1)} < 336$, $N_{\mathrm{ID}}^{(2)} < 3$ (TS 38.211, Sec. 7.4.2–7.4.3).
- PSS: the BPSK m-sequence $d(n) = 1 - 2x((n + 43 N_{\mathrm{ID}}^{(2)}) \bmod 127)$, $x(i+7) = (x(i+4) + x(i)) \bmod 2$, $[x(6) \dots x(0)] = [1,1,1,0,1,1,0]$;
- SSS: the BPSK Gold sequence $d(n) = [1 - 2x_{0}((n + m_{0}) \bmod 127)][1 - 2x_{1}((n + m_{1}) \bmod 127)]$, $x_{0}(i+7) = (x_{0}(i+4) + x_{0}(i)) \bmod 2$, $x_{1}(i+7) = (x_{1}(i+1) + x_{1}(i)) \bmod 2$, both started at $[0 \dots 0,1]$, $m_{0} = 15\lfloor N_{\mathrm{ID}}^{(1)}/112 \rfloor + 5 N_{\mathrm{ID}}^{(2)}$, $m_{1} = N_{\mathrm{ID}}^{(1)} \bmod 112$;
- PBCH DMRS: the QPSK $r(m) = [(1 - 2c(2m)) + j(1 - 2c(2m+1))]/\sqrt{2}$, $m < 144$,
of the Gold sequence of 3GPP (
comnum_math::sequences::gold_3gpp) with $c_{\mathrm{init}} = 2^{11}(\bar{\imath}{\mathrm{SSB}} + 1)(\lfloor N{\mathrm{ID}}^{\mathrm{cell}}/4 \rfloor + 1) + 2^{6}(\bar{\imath}{\mathrm{SSB}} + 1) + (N{\mathrm{ID}}^{\mathrm{cell}} \bmod 4)$, mapped frequency first.
detect_cell_id finds $N_{\mathrm{ID}}^{(2)}$ by the largest correlation of the
PSS subcarriers with the three PSS, then $N_{\mathrm{ID}}^{(1)}$ by the largest real
part of $\hat{h}^{*} \langle y_{\mathrm{SSS}}, d_{\mathrm{SSS}} \rangle$ over the 336
SSS, with the channel $\hat{h}$ estimated on the PSS (assumed flat over the 127
subcarriers and the three symbols).
§DMRS of the PDSCH
PdschDmrs gives the positions and values of the DMRS of a PDSCH of mapping type A
over a whole slot (14 symbols, normal prefix), single-symbol, port 1000: the first
DMRS symbol $l_{0} = 2$ or 3 (dmrs-TypeA-Position) and the additional positions
${l_{0}}$, ${l_{0}, 11}$, ${l_{0}, 7, 11}$, ${l_{0}, 5, 8, 11}$; the subcarriers
$k = 4n + 2k’$ (configuration type 1, one in two) or $k = 6n + k’$ (type 2, two in
six), $k’ \in {0, 1}$, with the QPSK value $r(2n + k’)$ of the Gold sequence of
$c_{\mathrm{init}} = (2^{17}(14 n_{s} + l + 1)(2N_{\mathrm{ID}} + 1) + 2N_{\mathrm{ID}})
\bmod 2^{31}$ (TS 38.211, Sec. 7.4.1.1). It gives a PilotTable for the channel
estimators of super::estimation. Shorter allocations, two-symbol DMRS and the
other ports need the tables of TS 38.211 (status needed in references/README.md).
§Examples
use comnum_waveform::ofdm::nr::{Numerology, pss, detect_cell_id, ssb_grid};
let nr = Numerology::new(1, false)?; // 30 kHz
assert_eq!((nr.subcarrier_spacing_hz(), nr.slots_per_frame()), (30e3, 20));
assert_eq!(nr.cp_lengths(4096)?[..2], [352, 288]); // (144 + 16·2)·2, 144·2
assert_eq!(pss(0)?.len(), 127);
let grid = ssb_grid(417, 0, None)?; // 4 × 240, no PBCH data
assert_eq!(detect_cell_id(&grid)?.0, 417);§References
- X. Lin et al., “5G New Radio: Unveiling the essentials of the next generation wireless access technology,” IEEE Commun. Standards Mag. 3(3), 30–37, 2019 (arXiv:1806.06898).
- D. Astély et al., “LTE: the evolution of mobile broadband,” IEEE Commun. Mag. 47(4), 44–51, 2009.
- 3GPP TS 38.211, NR; Physical channels and modulation, Sec. 5.3, 7.4.
Structs§
- Carrier
- An NR carrier: a grid of
n_subcarriers$K$ subcarriers of the numerologynumerology, at the FFT sizen_fft, whose first OFDM symbol is the symbolfirst_symbolof a subframe (see the module). - Numerology
- A numerology of NR: $\Delta f = 2^{\mu} \cdot 15$ kHz (see the module).
- Pdsch
Dmrs - The DMRS of a PDSCH of mapping type A over a slot of 14 symbols (see the module).
Enums§
- SsbElement
- What a resource element of the SSB carries.
Constants§
- SSB_
SUBCARRIERS - Subcarriers of the SSB.
- SSB_
SYMBOLS - OFDM symbols of the SSB.
- SUBCARRIERS_
PER_ RB - Subcarriers of a resource block.
- SYNC_
FIRST_ SUBCARRIER - First subcarrier of the PSS and of the SSS in the SSB.
- SYNC_
LENGTH - Length of the PSS and of the SSS.
Functions§
- detect_
cell_ id - The cell identity of a received SSB grid (
grid[l * 240 + k], 960 values), by the PSS then the SSS, coherently with the channel of the PSS (see the module); returns the identity and the normalised correlations $|\langle y, d \rangle| / (|y| |d|)$ of the PSS and of the SSS. - pbch_
dmrs - The 144 values of the PBCH DMRS of the cell
n_cell_idand the SSB index $\bar{\imath}_{\mathrm{SSB}}$ (0 to 7; see the module). - pss
- The PSS of $N_{\mathrm{ID}}^{(2)}$ (127 values $\pm 1$).
- ssb_
element - What the subcarrier
k(0 to 239) of the symboll(0 to 3) of the SSB of the celln_cell_idcarries (see the module). - ssb_
grid - The SSB of the cell
n_cell_idwith the SSB index $\bar{\imath}_{\mathrm{SSB}}$:grid[l * 240 + k], the PSS and the SSS of unit amplitude, the PBCH DMRS, and the 432 PBCH symbolspbch(zeros whenNone). - ssb_
indices - The resource elements
(k, l)of one kind in the SSB, frequency first (the order of the mapping). - sss
- The SSS of $(N_{\mathrm{ID}}^{(1)}, N_{\mathrm{ID}}^{(2)})$ (127 values $\pm 1$).