ltePUCCH2PRBS

PUCCH format 2 pseudorandom scrambling sequence

Syntax

[seq,cinit] = ltePUCCH2PRBS(ue,n)
[seq,cinit] = ltePUCCH2PRBS(ue,n,mapping)
[subseq,cinit] = ltePUCCH2PRBS(ue,pn)
[subseq,cinit] = ltePUCCH2PRBS(ue,pn,mapping)

Description

example

[seq,cinit] = ltePUCCH2PRBS(ue,n) returns the first n outputs of the Physical Uplink Control Channel (PUCCH) Format 2 scrambling sequence when initialized according to UE-specific settings, ue. It also returns an initialization value cinit for the pseudorandom binary sequence (PRBS) generator.

example

[seq,cinit] = ltePUCCH2PRBS(ue,n,mapping) allows control over the format of the returned sequence, seq, with the input mapping.

[subseq,cinit] = ltePUCCH2PRBS(ue,pn) returns a subsequence of a full PRBS sequence, specified by pn.

[subseq,cinit] = ltePUCCH2PRBS(ue,pn,mapping) allows control over the format of the returned subsequence, subseq, with the input mapping.

Examples

collapse all

Scramble the encoded UCI bits representing RI=3 using 2 bits. According to Table 5.2.2.6-6 in TS 36.212 this maps to the set of input bits [1; 0].

Create user-specific configuration structure. Generate a UCI codeword and a pseudorandom scrambling sequence for the PUCCH2 the same length as the codeword.

ue.NCellID = 1;
ue.NSubframe = 0;
ue.RNTI = 1;
cw = lteUCIEncode([1;0]);
seq = ltePUCCH2PRBS(ue,length(cw));
size(seq)
ans = 1×2

    20     1

Scramble the UCI codeword using the generated scrambling sequence.

scrambled = xor(seq,cw);

Generate unsigned and signed PUCCH format 2 pseudorandom scrambling sequences.

Create user-specific configuration structure.

ue.NCellID = 1;
ue.NSubframe = 0;
ue.RNTI = 1;

Generate a PUCCH format 2 pseudorandom scrambling sequence.

seq = ltePUCCH2PRBS(ue,5)
seq = 5x1 logical array

   1
   1
   0
   0
   1

Generate a signed PUCCH format 2 pseudorandom scrambling sequence.

seq = ltePUCCH2PRBS(ue,5,'signed')
seq = 5×1

    -1
    -1
     1
     1
    -1

Input Arguments

collapse all

UE-specific settings, specified as a structure. ue contains the following fields.

Physical layer cell identity number, specified as a nonnegative scalar integer.

Example: 1

Data Types: double

Subframe number, specified as a nonnegative scalar integer.

Example: 0

Data Types: double

Radio network temporary identifier (16-bit), specified as a scalar integer.

Example: 1

Data Types: double

Number of elements in returned sequence, seq, specified as a numeric scalar.

Data Types: double

Range of elements in returned subsequence, subseq, specified as a row vector of [p n]. The subsequence returns n values of the PRBS generator, starting at position p (0-based).

Data Types: double

Output sequence formatting, specified as 'binary' or 'signed'. mapping controls the format of the returned sequence.

  • 'binary' maps true to 1 and false to 0.

  • 'signed' maps true to –1 and false to 1.

Data Types: char | string

Output Arguments

collapse all

PUCCH format 2 pseudorandom scrambling sequence, returned as a logical column vector or a numeric column vector. seq contains the first n outputs of the scrambling sequence. If you set mapping to 'signed', the output data type is double. Otherwise, the output data type is logical.

Data Types: logical | double

PUCCH format 2 pseudorandom scrambling subsequence, returned as a logical column vector or a numeric column vector. subseq contains the values of the PRBS generator specified by pn. If you set mapping to 'signed', the output data type is double. Otherwise, the output data type is logical.

Data Types: logical | double

Initialization value for PRBS generator, returned as a numeric scalar.

Data Types: uint32

Introduced in R2014a