Main Content

ltePDSCHPRBS

PDSCH pseudorandom scrambling sequence

Description

example

[seq,cinit] = ltePDSCHPRBS(enb,rnti,cwIndex,n) returns a column vector containing the first n outputs of the Physical Downlink Shared Channel (PDSCH) scrambling sequence. It also returns an initialization value cinit for the pseudorandom binary sequence (PRBS) generator. The function is initialized according to cell-wide settings, enb, 16-bit rnti, and cwIndex, indicating which codeword this sequence scrambles.

[seq,cinit] = ltePDSCHPRBS(enb,rnti,cwIndex,n,mapping) allows control over the format of the returned sequence seq with the input mapping.

[subseq,cinit] = ltePDSCHPRBS(enb,rnti,cwIndex,pn) returns a subsequence of a full PRBS sequence, specified by pn.

[subseq,cinit] = ltePDSCHPRBS(enb,rnti,cwIndex,pn,mapping) allows additional control over the format of the returned subsequence, subseq, with the input mapping

Examples

collapse all

Scramble the contents of a codeword using the PDSCH scrambling sequence.

Create cell-wide configuration structure for reference channel R.0, get PDSCH indices, and a create codeword.

enb = lteRMCDL('R.0');
pdsch = enb.PDSCH;
[~,pdschInfo] = ltePDSCHIndices(enb,pdsch,pdsch.PRBSet);
codedTrBlkSize = pdschInfo.G;
cw = randi([0 1],codedTrBlkSize,1);

Generate PDSCH scrambling sequence, and scramble the codeword using the PDSCH scrambling sequence.

RNTI = 11;
ncw = 0;
pdschPrbsSeq = ltePDSCHPRBS(enb,RNTI,ncw,length(cw));
scrambled = xor(pdschPrbsSeq, cw);

Scramble the contents of two codewords using the PDSCH scrambling sequence. When transmitting multiple codewords via spatial multiplexing, each codeword uses a different scrambling sequence.

Create cell-wide configuration structure for reference channel R.14, get PDSCH indices.

rmc.RC = 'R.14';
rmc = lteRMCDL(rmc,2);
pdsch = rmc.PDSCH;
[~,pdschInfo] = ltePDSCHIndices(rmc,pdsch,pdsch.PRBSet);
codedTrBlkSize1 = pdschInfo.G(1);
codedTrBlkSize2 = pdschInfo.G(2);
cws{1} = randi([0 1],codedTrBlkSize1,1);
cws{2} = randi([0 1],codedTrBlkSize2,1);

Generate PDSCH scrambling sequences for two codewords, and scramble the codewords using the PDSCH scrambling sequences.

RNTI = 11;
ncw = 0;
pdschPrbsSeq1 = ltePDSCHPRBS(rmc,RNTI,ncw,length(cws{1}));
ncw = 1;
pdschPrbsSeq2 = ltePDSCHPRBS(rmc,RNTI,ncw,length(cws{2}));
scrambled1 = xor(pdschPrbsSeq1, cws{1});
scrambled2 = xor(pdschPrbsSeq2, cws{2});

Input Arguments

collapse all

Cell-wide settings, specified as a structure. enb contains the following fields.

Physical layer cell identity, specified as a nonnegative integer.

Data Types: double

Subframe number, specified as a nonnegative integer.

Data Types: double

Data Types: struct

Radio network temporary identifier, specified as nonnegative integer.

Data Types: double

Codeword index, specified as a 0 or 1. This input indicates which codeword this sequence scrambles.

Data Types: double

Length of scrambling sequence, specified as a positive integer.

Data Types: double

Range of scrambling 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

PDSCH scrambling sequence, returned as a logical column vector or a numeric column vector. seq argument contains the first n outputs of the PDSCH pseudorandom scrambling sequence. If mapping is set to 'signed', seq is a vector of data type double. Otherwise, it is a vector of data type logical.

Data Types: logical | double

PDSCH 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

Version History

Introduced in R2014a