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,n,Name,Value) specifies additional output formatting options by using one or more name-value pair arguments. Unspecified name-value pairs take their default values.

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

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

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

Introduced in R2019a