Main Content

ltePDSCHPRBS

PDSCH pseudorandom scrambling sequence

Description

example

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

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

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

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

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.enbcontains 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 returnsnvalues of the PRBS generator, starting at positionp(0-based).

Data Types:double

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

  • 'binary'mapstrueto 1 andfalseto 0.

  • 'signed'mapstrueto –1 andfalseto 1.

Data Types:char|string

Output Arguments

collapse all

PDSCH scrambling sequence, returned as a logical column vector or a numeric column vector.seqargument contains the firstnoutputs of the PDSCH pseudorandom scrambling sequence. Ifmappingis set to'signed',seqis 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.subseqcontains the values of the PRBS generator specified bypn. If you setmappingto'signed', the output data type isdouble. Otherwise, the output data type islogical

Data Types:logical|double

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

Data Types:uint32

版本历史

Introduced in R2014a