comnum.lte_decode_mib#

comnum.lte_decode_mib(x, cell, *, passes=4)#

The master information block of every frame of a capture at 1.92 MS/s whose PBCH decodes, for a cell of lte_cell_search(): the channel of every port estimated on the CRS of subframe 0, the PBCH equalised for 1, 2 and 4 ports (transmit diversity), descrambled for each quarter of the 40 ms period, decoded by the wrap-around Viterbi algorithm (tail-biting code) and checked by its CRC, whose mask tells the number of ports (TS 36.212 Sec. 5.3.1).

Parameters:
  • x (array_like) – the complex samples at 1.92 MS/s.

  • cell (dict) – a cell of lte_cell_search() (n_cell_id, cfo_hz, frame_start).

  • passes (int) – the passes of the wrap-around Viterbi algorithm.

Returns:

one per decoded frame, with the keys start (its first sample), sfn (the system frame number), ports, n_rb (the downlink bandwidth), phich_extended (bool), phich_ng and spare (the last 10 bits of the MIB).

Return type:

list[dict]

Raises:

ValueError – for a cell without its keys, an identity above 503 or no pass.

Examples

>>> import comnum, numpy as np
>>> x = np.concatenate([comnum.lte_frame(211, sfn=s, ports=2)[0] for s in (8, 9)])
>>> cell = comnum.lte_cell_search(x, max_cfo_hz=1e3)[0]
>>> [(f["sfn"], f["ports"], f["n_rb"]) for f in comnum.lte_decode_mib(x, cell)]
[(8, 2, 6), (9, 2, 6)]