nrPDSCHPRBS

Generate PDSCH scrambling sequence

Description

example

[seq,cinit] = nrPDSCHPRBS(nid,rnti,q,n) returns the first n elements of the physical downlink shared channel (PDSCH) scrambling sequence. The function also returns the initialization value cinit of the pseudorandom binary sequence (PRBS) generator. The initialization value depends on the scrambling identity number nid, the radio network temporary identifier (RNTI) of the user equipment (UE) rnti, and the codeword number q. The function implements TS 38.211 Section 7.3.1.1 [1].

[seq,cinit] = nrPDSCHPRBS(nid,rnti,q,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 300 outputs of the PDSCH scrambling sequence when initialized with the specified physical layer cell identity number, RNTI, and codeword number.

 ncellid = 17;
 rnti = 120;
 q = 0;
 n = 300;
 seq = nrPDSCHPRBS(ncellid,rnti,q,n)
seq = 300x1 logical array

   0
   1
   1
   0
   1
   1
   0
   1
   0
   0
      ⋮

Input Arguments

collapse all

Scrambling identity, specified as an integer from 0 to 1023. nid is the physical layer cell identity number (0 to 1007) or higher layer parameter dataScramblingIdentityPDSCH (0 to 1023). For more information, see TS 38.331 Section 6.3.2.

Data Types: double

RNTI of the UE, specified as an integer from 0 to 65,535.

Data Types: double

Codeword number, specified as 0 or 1.

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 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

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

Data Types: double | single | logical

Initialization value for PRBS generator, returned as a nonnegative integer.

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