lteSLSCH
Sidelink shared channel
Description
returns
the codeword column vector for the specified UE settings structure
and output length. cw
= lteSLSCH(ue
,outlen
,trblkin
)lteSLSCH
applies the complete
sidelink shared channel (SL-SCH) transport channel processing to the
input data, trblkin
.
For more information, see Sidelink Shared Transport Channel Processing.
Examples
Create and Decode SL-SCH Codeword
Use the physical channel bit capacity information to configure the output codeword size for SL-SCH coding. Decode the resulting codeword and check for CRC errors.
ue = struct('NSLRB',50,'CyclicPrefixSL','Normal'); ue.PRBSet = (10:12)'; ue.Modulation = '16QAM'; ue.RV = 0; [~,psschinfo] = ltePSSCHIndices(ue); cwlength = psschinfo.G; trblk = randi([0 1],100,1); cw = lteSLSCH(ue,cwlength,trblk); [rxtrblk,err] = lteSLSCHDecode(ue,length(trblk),cw); err
err = logical
0
The transport block is recovered with no error.
Create SL-SCH Codeword Sequence
Create a cell array containing the redundancy version (RV) sequence of four codewords that is ready for transmission on the PSSCH.
Initialize a UE settings structure.
ue = struct('NSLRB',50,'CyclicPrefixSL','Normal'); ue.PRBSet = (10:12)'; ue.Modulation = '16QAM';
Use the physical channel bit capacity information to configure the output codeword size for SL-SCH coding. Create a transport block of information bits.
[~,psschinfo] = ltePSSCHIndices(ue); cwlength = psschinfo.G; trblk = randi([0 1],100,1);
Use a for
loop to create a cell array containing the sequence of four SL-SCH codewords. RV
= 0,2,3,1 for transmission on the PSSCH.
rvseq = [0 2 3 1]; for ii = 1:length(rvseq) ue.RV = rvseq(ii); cwseq = lteSLSCH(ue,cwlength,trblk); cwseqCell{ii} = cwseq; end
Alternatively, the same cell array of SL-SCH codeword sequences can be created using an anonymous function handle.
rvseq = [0 2 3 1];
cwgenfn = @(rv)lteSLSCH(setfield(ue,'RV',rv),cwlength,trblk); %#ok<SFLD>
cwseqCell2 = arrayfun(cwgenfn,rvseq,'UniformOutput',false);
Input Arguments
ue
— User equipment settings
structure
User equipment settings, specified as a parameter structure containing these fields:
SidelinkMode
— Sidelink mode
'D2D'
(default) | 'V2X'
| optional
Sidelink mode, specified as 'D2D'
or
'V2X'
.
Data Types: char
| string
CyclicPrefixSL
— Cyclic prefix length
'Normal'
(default) | 'Extended'
| optional
Cyclic prefix length, specified as 'Normal'
or 'Extended'
.
Data Types: char
| string
Modulation
— Modulation type
'QPSK'
| '16QAM'
Modulation type, specified as 'QPSK'
or '16QAM'
.
Data Types: char
| string
RV
— Redundancy version indicator
0 | 1 | 2 | 3 | vector with element values from 0 to 3
Redundancy version indicator, specified as an integer scalar or vector with element values from 0 to 3.
Example: [0 2 3 1]
, indicates the RV sequence
order for transmission on the PSSCH.
Data Types: double
Data Types: struct
outlen
— Codeword length
integer scalar
Codeword length, specified as an integer scalar. For more information, see Sidelink Shared Transport Channel Processing.
Data Types: double
trblkin
— Transport block data bits
bit vector
Transport block data bits, specified as a bit vector.
Data Types: double
Output Arguments
cw
— PSSCH codeword
integer vector
PSSCH codeword, returned as an Mbit-by-1
integer vector. Mbit is
equal to outlen
and is the number of bits transmitted
on the physical sidelink shared channel in one subframe. outlen
must
be a multiple of the number of bits per symbol. For more information,
see Sidelink Shared Transport Channel Processing.
More About
Sidelink Shared Transport Channel Processing
The sidelink shared channel (SL-SCH) transport
channel processing includes type-24A CRC calculation, code block segmentation
(including type-24B CRC attachment, if present), turbo encoding, rate
matching with redundancy version (RV), code block concatenation, and
PUSCH interleaving. lteSLSCH
generates
this transport channel codeword as specified by TS 36.212, Section
5.4.2.
The SL-SCH transport
channel codeword carrying the information bits of a single transport
block is transmitted on the physical sidelink shared channel. Use
the ltePSSCH
and ltePSSCHIndices
functions to generate the
modulated symbols and populate the resource grid for transmission.
The length of the codeword output by lteSLSCH
represents
the bit capacity of the physical channel. For PSSCH, the input codeword
length is Mbits = NRE × Nbps,
where Nbps is the number
of bits per symbol. The PSSCH modulation is either QPSK (2 bits per
symbol) or 16QAM (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. NSYM is 12 for D2D normal cyclic prefix or 10 for D2D extended cyclic prefix and V2X.
For D2D sidelink, the SL-SCH codeword carrying the information bits of a single transport block is always transmitted four times on four consecutive PSSCH subframes using the fixed RV sequence, RV = 0,2,3,1. The transmission subframes are selected from a subset of the PSSCH subframe pool. There is no HARQ feedback involved in the process. For V2X, there can be either one or two transmissions of a transport block using the RV sequence, RV = 0,2. For more information on the SL-SCH transmission and the sidelink HARQ process, see TS 36.321, Section 5.14.2.2.
References
[1] 3GPP TS 36.212. “Evolved Universal Terrestrial Radio Access (E-UTRA); Multiplexing and channel coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.
[2] 3GPP TS 36.321. “Evolved Universal Terrestrial Radio Access (E-UTRA); Medium Access Control (MAC) protocol Specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.
Version History
Introduced in R2016b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)