PSSCH pseudorandom binary scrambling sequence
returns the first
cinit] = ltePSSCHPRBS(
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 . 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— Number of elements in returned sequence
Number of elements in returned sequence,
specified as a numeric scalar.
pn— Range of elements in returned subsequence
Range of elements in returned subsequence,
subseq, specified as a
row vector of
[p n]. The subsequence returns
values of the PRBS generator, starting at position
seq— PSSCH pseudorandom scrambling sequence
PSSCH pseudorandom scrambling sequence, returned as a logical column vector or a numeric
seq contains the first
n outputs of the physical sidelink shared channel
(PSSCH) scrambling sequence. If you set
'signed', the output data type is
double. Otherwise, the output data type is
subseq— PSSCH pseudorandom scrambling subsequence
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
'signed', the output
data type is
double. Otherwise, the output data type is
cinit— Initialization value for PRBS generator
Initialization value for PRBS generator, returned as a numeric scalar.
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. “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.