Synchronization Signal Blocks and Bursts

This example shows how to generate a synchronization signal block (SSB) and generate multiple SSBs to form a synchronization signal burst (SS burst). The channels and signals that form a synchronization signal block (primary and secondary synchronization signals, physical broadcast channel) are created and mapped into a matrix representing the block. Finally a matrix representing a synchronization signal burst is created, and each synchronization signal block in the burst is created and mapped into the matrix.

The variable pssSymbols is a column vector containing the 127 BPSK symbols of the PSS.

Create the PSS indices:

pssIndices = nrPSSIndices;

The variable pssIndices is a column vector of the same size as pssSymbols. The value in each element of pssIndices is the linear index of the location in the SS/PBCH block to which the corresponding symbols in pssSymbols should be mapped. Therefore the mapping of the PSS symbols to the SS/PBCH block can be performed with a simple MATLAB assignment, using linear indexing to select the correct elements of the SS/PBCH block matrix:

Create the SSS indices and map the SSS symbols to the SS/PBCH block, following the same pattern used for the PSS. Note that a scaling factor of 2 is applied to the SSS symbols, to represent in TS 38.211 Section 7.4.3.1.2:

sssIndices = nrSSSIndices;
ssblock(sssIndices) = 2 * sssSymbols;

The default form of the indices is 1-based linear indices, suitable for linear indexing of MATLAB matrices like ssblock as already shown. However, the NR standard documents describe the OFDM resources in terms of OFDM subcarrier and symbol subscripts, using 0-based numbering. For convenient cross-checking with the NR standard, the indices functions accept options to allow the indexing style (linear index versus subscript) and base (0-based versus 1-based) to be selected:

The PBCH carries a codeword of length 864 bits, created by performing BCH encoding of the master information block (MIB). For more information on BCH coding, see the functions nrBCH and nrBCHDecode and their use in the NR Synchronization Procedures example. Here a PBCH codeword consisting of 864 random bits is used:

cw = randi([0 1],864,1);

The PBCH modulation consists of the following steps as described in TS 38.211 Section 7.3.3:

Scrambling

Modulation

Mapping to physical resources

Multiple SS/PBCH blocks are transmitted across half a frame, as described in the cell search procedure in TS 38.213 Section 4.1. Each SS/PBCH block is given an index from , where is the number SS/PBCH blocks in the half frame. The scrambling sequence for the PBCH is initialized according to the cell identity ncellid, and the subsequence used to scramble the PBCH codeword depends on the value , 2 or 3 LSBs of SS/PBCH block index, as described in TS 38.211 Section 7.3.3.1. In this example, is used. The function nrPBCH creates the appropriate subsequence of the scrambling sequence, performs scrambling and then performs QPSK modulation:

The final component of the SS/PBCH block is the DM-RS associated with the PBCH. Similar to the PBCH, the DM-RS sequence used derives from the SS/PBCH block index and is configured using the variable described in TS 38.211 Section 7.4.1.4.1. Here is used:

Generating an SS burst

An SS burst, consisting of multiple SS/PBCH blocks, can be generated by creating a larger grid and mapping SS/PBCH blocks into the appropriate locations, with each SS/PBCH block having the correct parameters according to the location.

In the NR standard, OFDM symbols are grouped into slots, subframes and frames. As defined in TS 38.211 Section 4.3.1, there are 10 subframes in a frame, and each subframe has a fixed duration of 1ms. Each SS burst has a duration of half a frame, and therefore spans 5 subframes:

However, the number of slots per subframe varies and is a function of the subcarrier spacing. As the subcarrier spacing increases, the OFDM symbol duration decreases and therefore more OFDM symbols can be fitted into the fixed subframe duration of 1ms.

There are 5 subcarrier spacing configurations , with the corresponding subcarrier spacing being kHz. In this example we shall use , corresponding to 30 kHz subcarrier spacing:

mu = 1

mu = 1

The number of slots per subframe is , as doubling the subcarrier spacing halves the OFDM symbol duration. Note that definition of a slot in NR is different from LTE: a subframe in LTE consists of 2 slots of 7 symbols (for normal cyclic prefix) whereas in NR, a subframe using the LTE subcarrier spacing (, 15 kHz) consists of 1 slot of 14 symbols.

The pattern of SS/PBCH blocks within an SS burst is indirectly specified by the cell search procedure in TS 38.213, which describes the locations in which the UE may detect an SS/PBCH block. There are 5 block patterns, Case A - Case E, which have different subcarrier spacings and are applicable for different carrier frequencies.

Create the indices of the first symbols in the candidate SS/PBCH blocks for block pattern Case B, which has blocks per burst: