PSSCH pseudorandom binary scrambling sequence
seq = ltePSSCHPRBS(ue,n)
seq = ltePSSCHPRBS(ue,n,mapping)
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 . For more information, see Physical Sidelink Shared Channel Processing,
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
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
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.
ue— User equipment settings
User equipment settings, specified as a parameter structure containing these fields:
n— Length of the returned PSSCH scrambling sequence
Length of the returned PSSCH scrambling sequence, specified as a nonnegative integer.
seq— PSSCH pseudorandom scrambling sequence
PSSCH pseudorandom scrambling sequence, returned as a column
seq contains the
n outputs of the physical sidelink shared
channel (PSSCH) scrambling sequence.
mapping is set to
seq is a
mapping is set to
seq is a
Physical sidelink shared channel (PSSCH) processing includes PSSCH-specific scrambling, QPSK or 16-QAM modulation, and SC-FDMA transform precoding. PSSCH processing follows the processing steps used for PUSCH, with variations defined in TS 36.211, Section 9.3.
For PSSCH, the input codeword length is Mbits = NRE × Nbps, where Nbps is the number of bits per symbol. PSSCH modulation is either QPSK (2 bits per symbol) or 16 QAM (4 bits per symbol).
The number of PSSCH resource elements (NRE) in a subframe is NRE = NPRB × NREperPRB × NSYM and includes symbols associated with the sidelink SC-FDMA guard symbol.
NPRB is the number of physical resource blocks (PRB) used for transmission.
NREperPRB is the number of resource elements in a PRB. Each PRB has 12 resource elements.
NSYM is the number of SC-FDMA symbols in a PSSCH subframe, including symbols associated with the sidelink SC-FDMA guard symbol. The number of SC-FDMA symbols in a PSSCH subframe is 12 for D2D normal cyclic prefix or 10 for D2D extended cyclic prefix and V2X.
info structure output by
ltePSSCHIndices provides Mbits and NRE as
The scrambling sequence generator is initialized with at the start of every PSSCH subframe. For D2D sidelink, is the destination identity (
NSAID) obtained from the
sidelink shared channel. For V2X, is the V2X scrambling identity (
NXID). is the subframe number in the PSSCH subframe pool
deduce the number of resource blocks allocated for SC-FDMA precoding
 3GPP TS 36.211. “Physical Channels and Modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Evolved Universal Terrestrial Radio Access (E-UTRA). URL: http://www.3gpp.org.