Main Content

wlanConstellationDemap

Constellation demapping

Description

example

y= wlanConstellationDemap(sym,noiseVarEst,numBPSCS)demaps received symbolssymusing the soft-decision approximate log-likelihood-ratio (LLR) method fornumBPSCS, the number of coded bits per subcarrier per spatial stream.

example

y= wlanConstellationDemap(sym,noiseVarEst,numBPSCS,demapType)also specifies the demapping type.

example

y= wlanConstellationDemap(sym,noiseVarEst,numBPSCS,phase)derotates the symbols clockwise before demapping by the number of radians specified inphase.

example

y= wlanConstellationDemap(sym,noiseVarEst,numBPSCS,demapType,phase)specifies the demapping type and the phase rotation.

Examples

collapse all

Perform a 4096-QAM demapping on a sequence of data bits.

Create the sequence of data bits.

bits = randi([0 1],49152,1,'int8');

Perform constellation mapping on the data bits by using 4096-QAM.

numBPSCS = 12; sym = wlanConstellationMap(bits,numBPSCS); size(sym)
ans =1×24096 1

Perform 4096-QAM constellation demapping. Because the default demapping type is soft, the output is a vector of soft bits.

noiseVarEst = 0; y = wlanConstellationDemap(sym,noiseVarEst,numBPSCS); size(y)
ans =1×249152 1

Perform a 256-QAM demapping by using hard demodulation.

Create the sequence of data bits.

bits = randi([0 1],416,1);

Perform the constellation mapping on the data bits by using a 256-QAM constellation.

numBPSCS = 8; sym = wlanConstellationMap(bits,numBPSCS);

Perform the hard 256-QAM constellation demapping.

noiseVarEst = 0; demapType ='hard'; y = wlanConstellationDemap(sym,noiseVarEst,numBPSCS,demapType);

Verify that the demapped data matches the original data.

isequal(bits,y)
ans =logical1

BPSK and QBPSK demapping for different OFDM symbols for the VHT-SIG-A field by using a soft demodulation. The demapping is defined in IEEE® 802.11ac™-2013 Section 22.3.8.3.3

Create the sequence of data bits. Specify the two OFDM symbols in columns.

bits = randi([0 1],48,2,'int8');

Perform constellation mapping on the data bits. Specify the size of the constellation rotation as the number in columns of the input sequence. The first column is mapped with a BPSK modulation. The second column is modulated with a QBPSK modulation.

numBPSCS = 1; phase = [0 pi/2]; mappedData = wlanConstellationMap(bits,numBPSCS,phase);

Perform the constellation demapping with an estimated variance noise equal to zero (no added noise). To derotate the constellation, specify the same phase as in the mapping function. The output is a vector of soft bits ready to be the input of a convolutional decoder.

noiseVar = 0; demappedData = wlanConstellationDemap(mappedData,noiseVar,numBPSCS,phase);

Verify that the demapped data matches the original data. Because no noise is present, you can recover the original data without errors by assigning the negative values to a logical 1 and the positive values to a logical 0. In other words, you can convert the soft bits into hard bits.

demappedBits = int8((demappedData<=0)); isequal(bits,demappedBits)
ans =logical1

Perform BPSK demapping on a four-dimensional array by using hard demodulation.

Create the sequence of data bits as an array of four dimensions, with 416 coded bits per subcarrier per spatial stream per interleaver block, four OFDM symbols, two spatial streams, and two segments.

numCBPSSI = 416;numSym = 4;numSS = 2;numSeg = 2; bits = randi([0 1],numCBPSSI,numSym,numSS,numSeg); size(bits)
ans =1×4416 4 2 2

Perform BPSK constellation mapping on the data bits with a rotation of π 2 radians.

numBPSCS = 1; phase = pi/2; sym = wlanConstellationMap(bits,numBPSCS,phase); size(sym)
ans =1×4416 4 2 2

Perform hard QBPSK constellation demapping. To derotate the constellation, specify the same phase as in the mapping function.

noiseVarEst = 0; demapType ='hard'; y = wlanConstellationDemap(sym,noiseVarEst,numBPSCS,demapType);

Verify that the demapped data matches the original data.

isequal(bits,y)
ans =logical1

Input Arguments

collapse all

Received symbols, specified as a complex-valued vector, matrix, or multidimensional array. If you specify this input as a matrix or array, the function performs constellation demapping column-wise.

Data Types:double
Complex Number Support:Yes

Noise variance estimate, specified as a nonnegative scalar. When you specify thedemapTypeinput as'hard', the function does not use this input.

Example:0.7071

Data Types:double

Number of coded bits per subcarrier per spatial stream, specified aslog2(M), whereMis the modulation order. Therefore,numBPSCSmust be one of these values.

  • 1for binary phase-shift keying (BPSK) modulation, as specified in section 17.3.5.8 of[1]

  • 2for quadrature phase-shift keying (QPSK) modulation, as specified in section 17.3.5.8 of[1]

  • 4for 16-point quadrature amplitude modulation (16-QAM), as specified in section 17.3.5.8 of[1]

  • 6for 64-QAM, as specified in section 17.3.5.8 of[1]

  • 8for 256-QAM, as specified in section 21.3.12.9 of[2]

  • 10for 1024-QAM, as specified in section 27.3.12.9 of[2]

  • 12for 4096-QAM, as specified in section 36.3.12.8 of[3]

Data Types:double

Demapping type, specified as one of these values.

  • 'hard'— hard-decision demapping

  • 'soft'— soft-decision approximate LLR method

Data Types:double

Constellation rotation, in radians, specified as a scalar, vector, or multidimensional array. The size of this input must be compatible with the size of thesyminput. This input andsymhave compatible sizes if, for each corresponding dimension, the dimension sizes are either equal or one of them is 1. When one of the dimensions ofsymis equal to 1 and the corresponding dimension ofphaseis larger than 1, then the output dimensions have the same size as the dimensions ofphase.

Example:pi*(0:size(bits,1)/numBPSCS-1).'/2;

Data Types:double

Output Arguments

collapse all

Demapped symbols, returned as an integer-valued vector, matrix, or multidimensional array . This output has the same size assymexcept for the number of rows, which is equal to the number of rows ofsymmultiplied bynumBPSCS.

References

[1] IEEE Std 802.11™-2020 (Revision of IEEE Std 802.11-2016). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.” IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

[2] IEEE Std 802.11ax™-2021 (Amendment to IEEE Std 802.11-2020). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 1: Enhancements for High Efficiency WLAN.” IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

[3] IEEE®P802.11be™/D1.2. “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 8: Enhancements for Extremely High Throughput (EHT).” Draft Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

Extended Capabilities

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

Version History

Introduced in R2017b