comnum.lte_frame#

comnum.lte_frame(n_cell_id, *, sfn=0, n_rb=6, ports=1, n_fft=None, phich_extended=False, phich_ng=1.0, rng=None)#

The samples of every antenna port of one 10 ms frame of an LTE cell (FDD, normal cyclic prefix): the PSS and the SSS of slots 0 and 10 (port 0), the CRS of every port, the PBCH of slot 1 carrying the master information block of the frame (its 8 bits of frame number sfn // 4, its quarter sfn % 4 of the 40 ms period, transmit diversity for 2 or 4 ports), and QPSK symbols at random on the other elements of port 0 when rng is given (TS 36.211 Sec. 6.6, 6.10.1, 6.11).

Parameters:
  • n_cell_id (int) – the cell identity, 0 to 503.

  • sfn (int) – the system frame number.

  • n_rb (int) – the bandwidth in resource blocks, 6, 15, 25, 50, 75 or 100.

  • ports (int) – 1, 2 or 4 antenna ports.

  • n_fft (int | None) – the FFT size (the sampling rate n_fft · 15 kHz); the usual one of the bandwidth (128 to 2048) if None.

  • phich_extended (bool) – the PHICH duration of the MIB.

  • phich_ng (float) – the PHICH resource N_g of the MIB, 1/6, 1/2, 1 or 2.

  • rng (Rng | None) – the generator of the data symbols (none if None).

Returns:

(ports, 10 ms of samples) (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for an invalid parameter (the message names it).

Examples

>>> import comnum
>>> comnum.lte_frame(77, sfn=41, ports=2).shape                # 6 RB at 1.92 MS/s
(2, 19200)