Documentation

lteULSCHDecode

Uplink shared channel decoding

Syntax

  • [trblkout,blkcrc,stateout] = lteULSCHDecode(ue,chs,trblklen,cwin,statein)
    example

Description

example

[trblkout,blkcrc,stateout] = lteULSCHDecode(ue,chs,trblklen,cwin,statein) returns the information bits trblkout decoded from the input soft LLR codewords data cwin. The UL-SCH decoder includes channel deinterleaver, 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 input via 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 input cwin. If cwin is a cell array containing one or two codewords, trblkout returns a cell array of one or two transport blocks. If cwin is a vector of soft data, trblkout returns a vector too. If decoding a pair of codewords, pairs of modulation schemes and RV indicators are required to be defined in the associated parameter fields below. This function only decodes the information bits, but supports the presence of UCI data, CQI, RI, and HARQ-ACK, in the input codeword. UCI should be demultiplexed then decoded separately.

Strictly speaking, because all the fields in structure ue are optional, it is legal for this parameter to be an empty structure.

Multiple codewords can be parameterized by two different forms of the chs structure. Each codeword can be defined by separate elements of a 1-by-2 structure array, or the codeword parameters can be combined together in the fields of a single scalar, or 1-by-1, structure. Any scalar field values apply to both codewords and a scalar NLayers is the total number. See UL-SCH Parameterization for more details.

trblklen is an input vector (one or two elements in length) defining the transport block lengths that the input code blocks should be rate recovered and decoded to.

cwin is an input parameter containing the floating point soft LLR data of the codewords to be decoded. It can either be a single vector or a cell array containing one or two vectors. If the latter, then all rate matching calculations assume that the pair were transmitting on a single PUSCH, 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 then 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 i.e. 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 lteULSCHDecode 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 element structure array containing the internal state of each transport block decoder in the fields CBSBuffers, CBSCRC, blkcrc.

The stateout array would normally be reapplied via the statein variable of subsequent lteULSCHDecode function calls as part of a sequence of HARQ retransmissions.

Examples

collapse all

Decode UL-SCH

Generate and decode 2 transmissions (RV=0 then RV=2) as part of a single codeword HARQ process for the A3-3 FRC.

Initialize one subframe of an FRC A3-3 transmission. Create a codeword with RV = 0. Turn logical bits into 'LLR' data. 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.

nsf = 1;
frc = lteRMCUL('A3-3');
trBlkLen = frc.PUSCH.TrBlkSizes(nsf);
trBlkData = randi([0,1],trBlkLen,1);
frc.PUSCH.RV = 0;
cw = lteULSCH(frc,frc.PUSCH,trBlkData);
cw(cw == 0) = -1;
decState =[];
[rxTrBlk,~,decState] = lteULSCHDecode(frc,frc.PUSCH,trBlkLen,cw,decState);
Warning: Using default value for parameter field QdRI (0) 
Warning: Using default value for parameter field QdACK (0) 
Warning: Using default value for parameter field QdCQI (0) 

Create a second retransmitted codeword with RV = 2. Turn logical bits into 'LLR' data. The previous transmission decoder buffer state, decState, is used as part of the sequence of active HARQ transmissions.

frc.PUSCH.RV = 2;
cWord = lteULSCH(frc,frc.PUSCH,trBlkData);
cWord(cWord == 0) = -1;
rxTrBlk = lteULSCHDecode(frc,frc.PUSCH,trBlkLen,cWord,decState);
Warning: Using default value for parameter field QdRI (0) 
Warning: Using default value for parameter field QdACK (0) 
Warning: Using default value for parameter field QdCQI (0) 

Input Arguments

collapse all

ue — UE-specific settingsscalar structure

UE-specific settings, specified as a scalar structure with the following fields. Because all the fields in structure ue are optional, this parameter can be an empty structure.

Parameter FieldRequired or OptionalValuesDescription
CyclicPrefixULOptional

'Normal' (default), 'Extended'

Cyclic prefix length.

ShortenedOptional

0 (default), 1

Option to shorten the subframe by omitting the last symbol, specified as 0 or 1. If 1, the last symbol of the subframe is not used. For subframes with possible SRS transmission, set Shortened to 1 to maintain a standard compliant configuration.

Data Types: struct

chs — UL-SCH related parametersscalar structure

UL-SCH related parameters, specified as a scalar structure with the following fields.

Parameter FieldRequired or OptionalValuesDescription
ModulationRequired

'QPSK', '16QAM', '64QAM'

Modulation scheme associated with each transport block, specified as a string or, if there are 2 blocks, as a cell array of strings.

NLayersOptional

1 (default), 2, 3, 4

Number of transmission layers.

(total or per codeword)

RVRequired

0, 1, 2, 3

Redundancy version indicators, specified as a vector of 1 or 2 indicators.

QdCQIOptional

nonnegative scalar integer

Number of coded channel quality information (CQI) symbols (Q'_CQI)

QdRIOptional

Nonnegative scalar integer

0 (default)

Number of coded symbols for RI (Q'_RI)

QdACKOptional

nonnegative scalar integer

0 (default)

Number of coded ACK symbols (Q'_ACK)

NTurboDecItsOptional

Scalar integer

5 (default)

Number of turbo decoder iteration cycles

Data Types: struct

trblklen — Transport block lengthnumeric vector

Transport block length, specified as a numeric vector (one or two elements in length) defining the transport block lengths that the input code blocks should be rate recovered and decoded to.

Data Types: double

cwin — Soft LLR codeword datanumeric column vector | cell array of one or two column vectors

Soft LLR codeword data, specified as a numeric column vector or a cell array of one or two column vectors. This argument contains the floating point soft LLR data of the codeword or codewords to be decoded. It can either be a single vector or a cell array containing one or two vectors. If a cell array, all rate matching calculations assume that the pair were transmitting on a single PUSCH, distributed across the total number of layers defined in chs, as specified in [1].

Data Types: int8 | cell

statein — Initial HARQ process stateoptional | structure array

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

Data Types: double

Output Arguments

collapse all

trblkout — Decoded information bitsnumeric vector | cell array

Decoded information bits, returned as a numeric vector or cell array. trblkout contains decoded transport data blocks. It is either a single vector or a cell array containing one or two vectors, depending on the class and dimensionality of cwin.

Data Types: double | cell

blkcrc — Type 24A transport block CRC decoding result0 or 1

Type 24A transport block CRC decoding result, returned as 0 or 1.

Data Types: logical

stateout — HARQ process decoding statestructure | structure array

HARQ process decoding state, returned as a one-element structure array. It contains the internal state of each transport block decoder. It contains the following parameter fields.

Parameter FieldDescriptionValuesData Type
CBSBuffers

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, or after explicit rate recovery.

Cell array of numeric vectors

cell
CBSCRS

Type-24B code block set CRC decoding results

Numeric vector

int8
BLKCRC

Type-24A transport block CRC decoding error

One- or two-element numeric vector

logical

References

[1] 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.

Introduced in R2014a

Was this topic helpful?