Main Content

nrPUSCHPRBS

Generate PUSCH scrambling sequence

Description

example

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

[seq,cinit] = nrPUSCHPRBS(nid,rnti,nrapid,n) specifies random access preamble index nrapid to initialize the scrambling sequence for msgA on PUSCH, as defined in Release 16 of TS 38.211 Section 6.3.1.1.

[seq,cinit] = nrPUSCHPRBS(nid,rnti,nrapid,n,q) specifies the codeword number, q, to initialize the scrambling sequence, as described in Release 18 of TS 38.211 Section 6.3.1.1. In this syntax, when q is 1, nrapid must be empty. (since R2024a)

[seq,cinit] = nrPUSCHPRBS(___,Name,Value) specifies additional name-value arguments in addition to the input arguments in any of the previous syntaxes.

Examples

collapse all

Generate the first 300 elements of the PUSCH scrambling sequence when initialized with the specified physical layer cell identity number and RNTI.

ncellid = 17;
rnti = 120;
n = 300;
seq = nrPUSCHPRBS(ncellid,rnti,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 higher layer parameter dataScramblingIdentityPUSCH, ranging from 0 to 1023, if the higher layer parameter is configured. Otherwise, nid is physical layer cell identity number NCellID, ranging from 0 to 1007. For more information, see TS 38.211 Section 6.3.1.1.

Data Types: double

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

Data Types: double

Random access preamble index, specified as one of these values.

  • [] — Use this value to indicate that the scrambling initialization does not consider msgA on PUSCH.

  • Integer from 0 to 63 — Use this value to initialize the scrambling sequence for msgA on PUSCH, as defined in Release 16 of TS 38.211 Section 6.3.1.1.

Data Types: double

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

Data Types: double

Codeword number, specified as 0 or 1.

Data Types: double

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

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

PUSCH 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

Version History

Introduced in R2019a

expand all