nrPBCHPRBS

Generate PBCH scrambling sequence

Description

example

[seq,cinit] = nrPBCHPRBS(ncellid,v,n) returns the first n elements of the physical broadcast channel (PBCH) scrambling sequence. The pseudorandom binary sequence (PRBS) generator is initialized with the physical layer cell identity number ncellid and scrambling sequence phase v. The function implements TS 38.211 Section 7.3.3.1 [1]. The function also returns the initialization value cinit for the PRBS generator.

[seq,cinit] = nrPBCHPRBS(ncellid,v,n,Name,Value) specifies additional output formatting options by using one or more name-value pair arguments. Unspecified options take their default values.

Examples

collapse all

Generate the first 864 outputs of the PBCH scrambling sequence initialized with the specified physical layer cell identity number. The specified length of 864 corresponds to the PBCH bit capacity as specified in TS 38.212 Section 7.1.5. Consider the 43rd Synchronization Signal / Physical Broadcast Channel (SS/PBCH) block in a burst. Assume that the number of SS/PBCH blocks per half-frame is 64.

ncellid = 17;
ssbindex = 42;
v = mod(ssbindex,8); % assuming L_max = 64
E = 864; 

seq = nrPBCHPRBS(ncellid,v,E);

Input Arguments

collapse all

Physical layer cell identity number, specified as an integer from 0 to 1007.

Data Types: double

Scrambling sequence phase, specified as an integer from 0 to 7. v is derived in a synchronization signal (SS) burst configuration, from the least significant bits (LSBs) of the SS/PBCH block index.

  • If the number of SS/PBCH blocks per half-frame is 4, then v is the two LSBs of the SS/PBCH block index (0 to 3).

  • If the number of SS/PBCH blocks per half-frame is 8 or 64, then v is the three LSBs of the SS/PBCH block index (0 to 7).

Data Types: double

Number of elements in output sequence, specified as a nonnegative integer.

Data Types: double

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'MappingType','signed' specifies nondefault output sequence formatting.

Output sequence formatting, specified as the comma-separated pair consisting of 'MappingType' and one of these values:

  • 'binary' — This value maps true to 1 and false to 0. The data type of the output sequence is logical.

  • 'signed' — This value maps true to –1 and false to 1. The data type of the output sequence is double. To specify single data type, use the 'OutputDataType' name-value pair.

Data Types: char | string

Data type of output sequence, specified as the comma-separated pair consisting of 'OutputDataType' and 'double' or 'single'. This name-value pair applies only when 'MappingType' is set to 'signed'.

Data Types: char | string

Output Arguments

collapse all

PBCH scrambling sequence, returned as a logical or numeric column vector. The output seq contains the first n elements of the PBCH scrambling sequence. If you set 'MappingType' to 'signed', the data type of seq is either double or single. If you set 'MappingType' to 'binary', the data type of seq is logical.

Data Types: double | single | logical

Initialization value for PRBS generator, returned as a nonnegative integer from 0 to 1007. cinit is the same value as ncellid.

Data Types: double

References

[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

See Also

Functions

Introduced in R2018b