Main Content

nrPDSCHDecode

Decode PDSCH modulation symbols

Description

[cws,symbols] = nrPDSCHDecode(sym,mod,nid,rnti) returns soft bits cws and constellation symbols symbols resulting from the inverse operation of the physical downlink shared channel (PDSCH) processing specified in TS 38.211 Sections 7.3.11–3 [1]. The decoding consists of layer demapping, demodulation of sym with modulation scheme mod, and descrambling with scrambling identity nid. The input rnti is the radio network temporary identifier (RNTI) of the user equipment (UE).

example

[cws,symbols] = nrPDSCHDecode(carrier,pdsch,sym) returns soft bits cws and constellation symbols symbols for the specified carrier configuration, carrier, and PDSCH configuration, pdsch. The input sym specifies the received PDSCH symbols to decode.

example

[cws,symbols] = nrPDSCHDecode(___,nVar) specifies the noise variance scaling factor of the soft bits in the PDSCH demodulation, in addition to the input arguments in any of the previous syntaxes.

Examples

collapse all

Generate and decode PDSCH modulation symbols.

Specify a random sequence of binary values corresponding to a codeword of 8000 bits using 256-QAM modulation. Generate PDSCH modulation symbols for the specified physical layer cell identity number, RNTI, and number of transmission layers.

modulation = '256QAM';
nlayers = 4;
ncellid = 42;
rnti = 6143;
data = randi([0 1],8000,1);
txsym = nrPDSCH(data,modulation,nlayers,ncellid,rnti);

Add an additive white Gaussian noise (AWGN) to the PDSCH symbols. Then demodulate to produce soft bit estimates.

SNR = 30; % SNR in dB
rxsym = awgn(txsym,SNR);
rxbits = nrPDSCHDecode(rxsym,modulation,ncellid,rnti);

Create a carrier configuration object with default properties. Specify the physical layer cell identity as 42.

carrier = nrCarrierConfig;
carrier.NCellID = 42;

Create a PDSCH configuration object with default properties. Set the radio network temporary identifier to 1005, size of the bandwidth part to 25, starting PRB index of the BWP to 10, and the PRB set to occupy the whole BWP.

pdsch = nrPDSCHConfig;
pdsch.RNTI = 1005;
pdsch.NID = []; % Set NID equal to the NCellID property of carrier
pdsch.NSizeBWP = 25;
pdsch.NStartBWP = 10;
pdsch.PRBSet = 0:pdsch.NSizeBWP-1;

Generate PDSCH symbols for a single codeword of 8000 bits with the specified carrier configuration and PDSCH configuration.

cws = randi([0 1],8000,1);
sym = nrPDSCH(carrier,pdsch,cws);

Add an additive white Gaussian noise (AWGN) to the PDSCH symbols. Then demodulate the symbols to produce soft-bit estimates.

SNR = 30; % SNR in dB
rxsym = awgn(sym,SNR);
[rxbits,symbols] = nrPDSCHDecode(carrier,pdsch,rxsym);

Input Arguments

collapse all

Received PDSCH modulation symbols, specified as a complex matrix of size NRE-by-NLayers. NRE is the number of resource elements in a layer, and NLayers is the number of layers. NLayers determines the number of codewords in cws.

  • If NLayers is from 1 to 4, the function returns one codeword in cws.

  • If NLayers is from 5 to 8, the function returns two codewords in cws.

Data Types: single | double
Complex Number Support: Yes

Modulation scheme, specified as 'QPSK', '16QAM', '64QAM', '256QAM', '1024QAM', a string array, or a cell array of character vectors. This modulation scheme specifies the modulation type of the codewords and the number of bits used per modulation symbol. If cws contains two codewords, the modulation scheme applies to both codewords. Alternatively, you can specify different modulation schemes for each codeword by using a string array or a cell array of character vectors.

Modulation SchemeNumber of Bits Per Symbol
'QPSK'2
'16QAM'4
'64QAM'6
'256QAM'8
'1024QAM'10

Example: To specify different modulation schemes for two codewords, you can use any of these formats: {'QPSK','16QAM'} or ["QPSK","16QAM"].

Data Types: char | string | cell

Scrambling identity, specified as an integer from 0 to 1023. nid is the physical layer cell identity number (0 to 1007) or higher layer parameter dataScramblingIdentityPDSCH (0 to 1023). For more information, see TS 38.331 Section 6.3.2.

Data Types: double

RNTI of the UE, specified as an integer from 0 to 65,535.

Data Types: double

Noise variance, specified as a nonnegative numeric scalar. The soft bits are scaled with the variance of additive white Gaussian noise (AWGN). The default value corresponds to an SNR of 100 dB, assuming unit signal power.

Note

The default value assumes the decoder and coder are connected back-to-back, where the noise variance is zero. To avoid -Inf or +Inf values in the output, the function uses 1e-10 as the default value for noise variance. To get appropriate results when the signal is transmitted through a noisy channel, adjust the noise variance accordingly.

Data Types: double

Carrier configuration parameters for a specific OFDM numerology, specified as an nrCarrierConfig object. This function uses only the NCellID property of the nrCarrierConfig object.

PDSCH configuration parameters, specified as an nrPDSCHConfig object. This function uses only these nrPDSCHConfig object properties.

Output Arguments

collapse all

Approximate log likelihood ratio (LLR) soft bits, returned as a cell array of one or two real column vectors. The column vectors in cws have the same data type as sym. The number of column vectors depends on the number of layers in sym. The signs in the output values represent the hard bits.

Data Types: cell

Symbol constellation for each codeword in cws, returned as a cell array of one or two column vectors of complex numbers. The column vectors in symbols have the same data type as sym.

Data Types: cell

References

[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2018b

expand all