Main Content

ltePSSCHPRBS

PSSCH pseudorandom binary scrambling sequence

Description

[seq,cinit] = ltePSSCHPRBS(ue,n) returns the first n outputs of the PSSCH pseudorandom binary scrambling sequence (PRBS) for the specified UE settings structure. It also returns an initialization value cinit for the pseudorandom binary sequence (PRBS) generator.

The scrambling sequence generated should be applied to the coded PSSCH data carried by the associated subframe. The PRBS sequence generator used is initialized with cinit=nIDX×214+nssfPSSCH×29+510. For more information, see Physical Sidelink Shared Channel Processing, ue.NSAID and ue.NXID

example

[seq,cinit] = ltePSSCHPRBS(ue,n,mapping) specifies the format of the returned sequence, seq, through the mapping input.

example

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

[subseq,cinit] = ltePSSCHPRBS(ue,pn,mapping) specifies the format of the returned subsequence, subseq, through the mapping input.

Examples

collapse all

Scramble a PSSCH codeword by generating the PSSCH pseudorandom binary sequence (PRBS) and applying an exclusive OR operation on the two sequences.

Create a UE settings structure with required fields. Generate the required length of the PRBS. Scramble the PSSCH codeword with the PRBS sequence using xor.

ue = struct('NSAID',255,'NSubframePSSCH',0);

codeword = ones(1152,1);
psschPrbs = ltePSSCHPRBS(ue,length(codeword));

scrambled = xor(psschPrbs,codeword);

Descramble a received PSSCH codeword.

Scramble PSSCH Codeword

  • Create a UE settings structure with required fields.

  • Generate the required length of the PRBS.

  • Scramble the PSSCH codeword with the PRBS sequence using xor.

  • Modulate the logical scrambled data.

ue = struct('NSAID',255,'NSubframePSSCH',0);

codeword = ones(1152,1);
psschPrbs = ltePSSCHPRBS(ue,length(codeword));

scrambled = xor(psschPrbs,codeword);

txsym = lteSymbolModulate(scrambled,'16QAM');

Descramble Recovered Codeword

  • Add noise to transmitted symbols and demodulate received soft data.

  • Generate the PSSCH PRBS in signed form.

  • Descramble the vector representing a sequence of soft bits by generating the PSSCH PRBS in signed form and performing a pointwise multiplication between the PRBS sequence and the recovered soft data.

  • Compare the transmitted codeword to the recovered codeword.

sym = awgn(txsym,30,'measured');
softdata = lteSymbolDemodulate(sym,'16QAM');

scramblingSeq = ltePSSCHPRBS(ue,length(softdata),'signed');
descrambled = softdata.*scramblingSeq;

isequal(codeword,descrambled > 0)
ans = logical
   1

The transmitted codeword matches the hard decision on the descrambled data.

Input Arguments

collapse all

User equipment settings, specified as a parameter structure containing these fields:

Sidelink mode, specified as 'D2D' or 'V2X'.

Data Types: char | string

Sidelink group destination identity, specified as an integer in the interval [0, 255].

This field is the lower eight bits of the full 24-bit ProSe Layer-2 group destination ID. This field and the NSubframePSSCH field control the value of the scrambling sequence at the start of each subframe. This field is required only for D2D sidelink.

Data Types: double

V2X scrambling identity, specified as an integer scalar. NXID is the 16 bit CRC associated with the PSCCH SCI grant. It is only required for V2X sidelink.

Data Types: double

PSSCH subframe number in the PSSCH subframe pool, specified as an integer scalar (nssfPSSCH).

NSubframePSSCH and NSAID control the values of the scrambling sequence. It is only required for D2D sidelink.

Data Types: double

Data Types: struct

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'.

  • '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

PSSCH pseudorandom scrambling sequence, returned as a logical column vector or a numeric column vector. seq contains the first n outputs of the physical sidelink shared channel (PSSCH) 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

PSSCH 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

More About

collapse all

References

[1] 3GPP TS 36.211. “Evolved Universal Terrestrial Radio Access (E-UTRA); Physical Channels and Modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.

Version History

Introduced in R2016b