Documentation

ltePDSCHPRBS

PDSCH pseudorandom scrambling sequence

Syntax

  • seq = ltePDSCHPRBS(enb,rnti,ncw,n)
    example
  • seq = ltePDSCHPRBS(enb,rnti,ncw,n,mapping)

Description

example

seq = ltePDSCHPRBS(enb,rnti,ncw,n) returns a column vector containing the first n outputs of the Physical Downlink Shared Channel (PDSCH) scrambling sequence when initialized according to cell-wide settings, enb, 16-bit rnti, and ncw, which is either 0 or 1, indicating which codeword this sequence would scramble.

seq = ltePDSCHPRBS(enb,rnti,ncw,n,mapping) allows control over the format of the returned sequence seq through the string mapping. Valid formats are 'binary', the default, and 'signed'. The 'binary' format maps true to 1 and false to 0. The 'signed' format maps true to –1 and false to 1.

Examples

collapse all

Scramble Codeword Using PDSCH PRBS

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 Two Codewords Using PDSCH PRBS

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

enb — Cell-wide settingsstructure

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

NCellID — Physical layer cell identitynonnegative integer

Physical layer cell identity, specified as a nonnegative integer.

Data Types: double

NSubframe — Subframe numbernonnegative integer

Subframe number, specified as a nonnegative integer.

Data Types: double

Data Types: struct

rnti — Radio network temporary identifiernonnegative integer

Radio network temporary identifier, specified as nonnegative integer.

Data Types: double

ncw — Number of codewords0 | 1

Number of codewords, specified as a 0 or 1. This input indicates which codeword this sequence scrambles.

Data Types: double

n — Length of scrambling sequencepositive integer

Length of scrambling sequence, specified as a positive integer.

Data Types: double

mapping — Format of returned sequence'binary' (default) | 'signed'

Format of returned sequence, specified as a string. This input controls the format of the returned sequence, seq. The string 'binary' maps true to 1 and false to 0. The string 'signed' maps true to –1 and false to 1.

Data Types: char

Output Arguments

collapse all

seq — PDSCH scrambling sequencelogical column vector | numeric column vector

PDSCH scrambling sequence, returned as a numeric column vector. This output argument contains the first n outputs of the PDSCH pseudorandom scrambling sequence.

Data Types: logical | double

Introduced in R2014a

Was this topic helpful?