Main Content

lteDLSCHDecode

Downlink shared channel decoding

Description

[trblkout,blkcrc,stateout] = lteDLSCHDecode(enb,chs,trblklen,cwin,statein) returns the information bits, trblkout, decoded from the input soft LLR codeword data, cwin. The DL-SCH decoder includes rate recovery, turbo decoding, block concatenation, and CRC calculations. The function also returns the type-24A transport block CRC decoding result in blkcrc and the HARQ process decoding state in stateout. The initial HARQ process state can be provided as the optional statein parameter. The function is capable of processing both a single codeword or pairs of codewords, contained in a cell array, for the case of spatial multiplexing schemes transmitting two codewords. The type of the return variable, trblkout, is the same as the input, cwin. If cwin is a cell array containing one or two codewords, trblkout is a cell array of one or two transport blocks. If cwin is a vector of soft data, trblkout is a vector also. If you are decoding a pair of codewords, you must provide pairs of modulation schemes and RV indicators in the appropriate parameter fields.

enb is an input parameter structure that may include optional fields defining the duplex mode. Since the duplex mode defaults to 'FDD', if the 'DuplexMode' field is absent, enb can be an empty structure.

chs is an input parameter structure defining aspects of the PDSCH onto which the codewords are mapped and the DL-SCH soft buffer size and redundancy versions of the received codewords.

trblklen is an input vector, one or two elements in length, defining the transport block lengths to which the input code blocks are rate recovered and decoded.

cwin is an input parameter containing the floating point soft LLR data of the codewords to be decoded. It is either a single vector or a cell array containing one or two vectors. If it is a cell array, all rate matching calculations assume that the pair is transmitting on a single PDSCH, distributed across the total number of layers defined in chs, as per TS 36.211 [1].

statein is an optional input structure array, empty or one or two elements, which can input the current decoder buffer state for each transport block in an active HARQ process. If statein is not an empty array and it contains a non-empty field, CBSBuffers, this field should contain a cell array of vectors representing the LLR soft buffer states for the set of code blocks at the input to the turbo decoder, after explicit rate recovery. The updated buffer states after decoding are returned in the CBSBuffers field in the output parameter, stateout. The statein array would normally be generated and recycled from the stateout of previous calls to lteDLSCHDecode as part of a sequence of HARQ transmissions.

trblkout is the output parameter containing the decoded information bits. It is either a single vector or a cell array containing one or two vectors, depending on the class and dimensionality of cwin.

blkcrc is an output array, one or two elements, containing the result of the type-24A transport block CRC decoding for the transport blocks.

stateout, the final output parameter, is a one- or two-element structure array containing the internal state of each transport block decoder. The stateout array is normally reapplied via the statein variable of subsequent lteDLSCHDecode function calls as part of a sequence of HARQ retransmissions.

example

Examples

collapse all

This example generates and decodes 2 transmissions, one with RV set to 0 and one with RV set to 1, as part of a single codeword HARQ process for RMC R.7.

Set subframe number. Get the definition of RMC R.7. Generate transport block data. Apply DL-SCH transport channel coding chain to trBlkData. Create a codeword with RV = 0. Turn logical bits into 'LLR' data

nsf = 1;

rmc = lteRMCDL('R.7');

trBlkSize = rmc.PDSCH.TrBlkSizes(nsf);
codedTrBlkSize = rmc.PDSCH.CodedTrBlkSizes(nsf);
trBlkData = randi([0,1],trBlkSize,1);

rmc.PDSCH.RV = 0;        
cw = lteDLSCH(rmc,rmc.PDSCH,codedTrBlkSize,trBlkData);

cw(cw == 0) = -1;

Initialize the decoder states for the first HARQ transmission. The returned decState contains the decoder buffer state for each transport block for an active HARQ process with RV = 1

decState = [];
[rxTrBlk,~,decState] = lteDLSCHDecode(rmc,rmc.PDSCH,trBlkSize,cw,decState);

Create a second retransmitted codeword. Turn logical bits into 'LLR' data. Use the previous transmission decoder buffer state, decState, as part of the sequence of active HARQ transmissions

rmc.PDSCH.RV = 1;
cw = lteDLSCH(rmc,rmc.PDSCH,codedTrBlkSize,trBlkData);

cw(cw == 0) = -1;  
rxTrBlk = lteDLSCHDecode(rmc,rmc.PDSCH,trBlkSize,cw,decState);

size(rxTrBlk)
ans = 1×2

       28336           1

rxTrBlk(1:10)
ans = 10x1 int8 column vector

   1
   1
   0
   1
   1
   0
   0
   1
   1
   1

Input Arguments

collapse all

Cell-wide settings, specified as a structure with the following fields.

Parameter FieldRequired or OptionalValuesDescription

If chs.NSoftBits is defined include:

  DuplexModeOptional

'FDD' (default), 'TDD'

Duplexing mode, specified as either:

  • 'FDD' for Frequency Division Duplex

  • 'TDD' for Time Division Duplex

Because the duplex mode defaults to 'FDD', if this field is absent, enb can be an empty structure.

When DuplexMode is set to 'TDD' include:

  TDDConfigOptional

0, 1 (default), 2, 3, 4, 5, 6

Uplink–downlink configuration

Only required for 'TDD' duplex mode.

Data Types: struct

Channel configuration, specified as a structure having the following fields.

Parameter FieldRequired or OptionalValuesDescription
ModulationRequired'QPSK', '16QAM', '64QAM', '256QAM', '1024QAM'

Modulation type associated with each transport block, specified as a character vector, cell array of character vectors for 2 blocks, or string array.

NLayersRequired

1, 2, 3, 4

Total number of transmission layers associated with the transport block or blocks.

TxSchemeOptional

'Port0' (default), 'TxDiversity', 'CDD', 'SpatialMux', 'MultiUser', 'Port5', 'Port7-8', 'Port8', 'Port7-14'.

PDSCH transmission scheme, specified as one of the following options.

Transmission schemeDescription
'Port0'Single antenna port, port 0
'TxDiversity'Transmit diversity
'CDD'Large delay cyclic delay diversity scheme
'SpatialMux'Closed loop spatial multiplexing
'MultiUser'Multi-user MIMO
'Port5'Single-antenna port, port 5
'Port7-8'Single-antenna port, port 7, when NLayers = 1. Dual layer transmission, ports 7 and 8, when NLayers = 2.
'Port8'Single-antenna port, port 8
'Port7-14'Up to eight layer transmission, ports 7–14

RVRequired

0, 1, 2, 3

2-element numeric vector

Redundancy version indicator, specified as a numeric vector of 1 or 2 values. Possible values are 0, 1, 2, or 3.

NSoftbitsOptional

Nonnegative scalar integer (default 0)

Total number of soft buffer bits. The default setting of 0 signifies that there is no buffer limit.

If NSoftbits is absent, no limit is placed on the number of soft bits.

NTurboDecItsOptional

5 (default)

Integer from 1 to 30

Number of turbo decoder iteration cycles

Data Types: struct

Transport block lengths, specified as a one- or two-element numeric vector. It defines the transport block lengths to which the input code blocks should be rate-recovered and decoded.

Data Types: double

Soft LLR data of the codewords to be decoded, specified as either a numeric vector or a cell array containing one or two vectors.

Data Types: double

Initial HARQ process state, specified as a structure array. Optional. This structure array, which can be empty or contain one or two elements, can input the current decoder buffer state for each transport block in an active HARQ process.

Data Types: struct

Output Arguments

collapse all

Decoded information bits, returned as a numeric vector or a cell array of one or two numeric vectors. trblkout reflects the data type and size of cwin.

Data Types: int8 | cell

Type-24A transport block CRC decoding result, returned as a logical vector of one or two elements.

Data Types: logical

HARQ process decoding state, returned as a structure array of one or two elements. It contains the internal state of each transport block in the following fields.

Parameter FieldValuesDescription
CBSBuffers

Cell array of vectors

Cell array of vectors representing the LLR soft buffer states for the set of code blocks associated with a single transport block. The buffers are positioned at the input to the turbo decoder, after explicit rate recovery.

CBSCRC

Logical vector

Array of type-24B code block set CRC decoding results

BLKCRC

Logical scalar

Type-24A transport block CRC decoding error

Data Types: struct

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 R2014a