Main Content

wlanHEDataBitRecover

Recover bits from HE-Data field

Description

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,cfgHE) recovers dataBits, a column vector of bits, from rxDataSym, the equalized OFDM symbols that make up the HE-Data field of a high-efficiency single-user (HE SU) transmission. The function recovers dataBits by using noise variance estimate noiseVarEst and HE transmission parameters cfgHE.

example

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,csi,cfgHE) enhances the demapping of OFDM subcarriers by using csi, a vector that contains channel state information (CSI).

example

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,cfgHE,userIdx) recovers dataBits for one user, specified by user index userIdx, in a high-efficiency multi-user (HE MU) transmission.

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,csi,cfgHE,userIdx) recovers dataBits for the specified user in an HE MU transmission and enhances the demapping of OFDM subcarriers by using channel state information

example

dataBits = wlanHEDataBitRecover(___,Name,Value) specifies algorithm options by using one or more name-value pair arguments, in addition to any input argument combination from previous syntaxes. For example, 'LDPCDecodingMethod','layered-bp' specifies the layered belief propagation low-density parity-check (LDPC) decoding algorithm.

example

Examples

collapse all

Configure an HE SU transmission by creating a configuration object with the specified modulation and coding scheme (MCS). Extract the channel bandwidth.

cfgHESU = wlanHESUConfig('MCS',0);
cbw = cfgHESU.ChannelBandwidth;       

Create a sequence of data bits and generate an HE SU waveform.

bits = randi([0 1],8*getPSDULength(cfgHESU),1,'int8');
waveform = wlanWaveformGenerator(bits,cfgHESU);

Create a WLAN recovery configuration object, specifying the known channel bandwidth and packet format.

cfgRX = wlanHERecoveryConfig('ChannelBandwidth',cbw,'PacketFormat','HE-SU');

Recover the HE signaling fields by retrieving the field indices and performing the relevant demodulation operations.

ind = wlanFieldIndices(cfgRX);
heLSIGandRLSIG = waveform(ind.LSIG(1):ind.RLSIG(2),:);
symLSIG = wlanHEDemodulate(heLSIGandRLSIG,'L-SIG',cbw);
info = wlanHEOFDMInfo('L-SIG',cbw);

Merge the L-SIG and RL-SIG fields for diversity and obtain the data subcarriers.

symLSIG = mean(symLSIG,2);
lsig = symLSIG(info.DataIndices,:);

Decode the L-SIG field, assuming a noiseless channel, and use the length field to update the recovery object.

noiseVarEst = 0;
[~,~,lsigInfo] = wlanLSIGBitRecover(lsig,noiseVarEst);
cfgRX.LSIGLength = lsigInfo.Length;

Recover and demodulate the HE-SIG-A field, obtain the data subcarriers, and recover the HE-SIG-A bits.

heSIGA = waveform(ind.HESIGA(1):ind.HESIGA(2),:);
symSIGA = wlanHEDemodulate(heSIGA,'HE-SIG-A',cbw);
siga = symSIGA(info.DataIndices,:);
[sigaBits,failCRC] = wlanHESIGABitRecover(siga,0);

Update the recovery configuration object with the recovered HE-SIG-A bits and obtain the updated field indices.

cfgHE = interpretHESIGABits(cfgRX,sigaBits);
ind = wlanFieldIndices(cfgHE);

Retrieve and decode the HE-Data field.

heData = waveform(ind.HEData(1):ind.HEData(2),:);
symData = wlanHEDemodulate(heData,'HE-Data', ... 
    cbw,cfgHE.GuardInterval,[cfgHE.RUSize cfgHE.RUIndex]);
infoData = wlanHEOFDMInfo('HE-Data',cbw,cfgHE.GuardInterval,[cfgHE.RUSize cfgHE.RUIndex]);
rxDataSym = symData(infoData.DataIndices,:,:);
dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,cfgHE);

Confirm that the recovered bits match the transmitted bits.

isequal(bits,dataBits)
ans = logical
   1

Create an HE SU configuration object, specifying a modulation and coding scheme of 11.

cfgHE = wlanHESUConfig('MCS',11);

Get the PSDU length of the waveform in bits. Generate a random sequence of bits with length equal to the PSDU length. Generate a waveform for the bits and the configuration.

psduLength = 8*getPSDULength(cfgHE);
bits = randi([0 1],psduLength,1,'int8');
waveform = wlanWaveformGenerator(bits,cfgHE);

Set a signal-to-noise ratio (SNR) of 30 dB, and pass the waveform through an AWGN channel.

snr = 30;
rx = awgn(waveform,snr);

Extract the HE-Data field from the received waveform.

ind = wlanFieldIndices(cfgHE);
rxData = rx(ind.HEData(1):ind.HEData(2),:);

Perform OFDM demodulation on the received HE-Data field.

sym = wlanHEDemodulate(rxData,'HE-Data',cfgHE);

Obtain the data subcarriers from the received symbols.

info = wlanHEOFDMInfo('HE-Data',cfgHE);
rxDataSym = sym(info.DataIndices,:,:);

Recover the bits from the HE-Data field for the appropriate noise variance estimate.

noiseVarEst = 10^(-snr/10);         
dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,cfgHE);

Confirm that the recovered bits match the transmitted bits.

isequal(bits,dataBits)
ans = logical
   1

Configure an HE MU transmission for two users, specifying a channel bandwidth of 20 MHz and four 52-tone resource units (RUs), each with one user.

AllocationIndex = 112;
cfgHE = wlanHEMUConfig(AllocationIndex);

Specify the MCS for the first and second user and an APEP length for the second user. Make the third RU unassigned by setting the STAID property of the third user to 2046.

cfgHE.User{1}.MCS = 4;
cfgHE.User{2}.APEPLength = 1e3;
cfgHE.User{2}.MCS = 7;
cfgHE.User{3}.STAID = 2046;

Generate a random PSDU for each user.

numUsers = numel(cfgHE.User);
psduLength = getPSDULength(cfgHE);
bits = cell(1,numUsers);
for i = 1:numUsers
   bits{i} = randi([0 1],8*psduLength(i),1);
end

Generate an OFDMA waveform and transmit through an AWGN channel for the specified SNR.

waveform = wlanWaveformGenerator(bits,cfgHE);
snr = 25;
noiseVarEst = 10^(-snr/10);
rx = awgn(waveform,snr);

Extract the HE-Data field from the received waveform.

ind = wlanFieldIndices(cfgHE);
rxData = rx(ind.HEData(1):ind.HEData(2),:);

Perform OFDM demodulation on the received HE-Data field for each RU, obtain the data subcarriers, and recover the bits for each user. Use an if statement to skip unassigned RUs.

allocationInfo = ruInfo(cfgHE);
for userIdx = 1:allocationInfo.NumUsers
    if ~allocationInfo.RUAssigned(userIdx)
        continue
    end
    ruNumber = allocationInfo.RUNumbers(userIdx);
    sym = wlanHEDemodulate(rxData,'HE-Data',cfgHE,ruNumber);

Because this example does not use equalization, we must scale the received symbols by a scaling factor equal to the ratio of the total number of tones to the number of tones in the RU of interest.

    sf = sqrt(sum(allocationInfo.RUSizes)/allocationInfo.RUSizes(userIdx));
    symScaled = sf*sym;

Extract the data subcarriers.

    ofdmInfo = wlanHEOFDMInfo('HE-Data',cfgHE,ruNumber);
    rxDataSym = symScaled(ofdmInfo.DataIndices,:,:);

Assume a CSI estimate of all ones and recover the bits, confirming that the recovered bits match the transmitted bits.

    csi = ones(length(rxDataSym),1);
    dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,csi,cfgHE,userIdx);
    disp(isequal(dataBits,bits{userIdx}))
end
   1

   1

   1

Generate a WLAN HE TB waveform in response to a frame containing the TRS control subfield.

cfgHE = getTRSConfiguration(wlanHETBConfig);
psduLength = 8*getPSDULength(cfgHE);
bits = randi([0,1],psduLength,1,'int8');
waveform = wlanWaveformGenerator(bits,cfgHE);

Pass the waveform through an AWGN channel with an SNR of 30 dB.

snr = 30;
rx = awgn(waveform,snr);

Extract the HE-Data field from the received waveform.

ind = wlanFieldIndices(cfgHE);
rxData = rx(ind.HEData(1):ind.HEData(2),:);

Demodulate the waveform and extract the data subcarriers.

demod = wlanHEDemodulate(rxData,'HE-Data',cfgHE);
info = wlanHEOFDMInfo('HE-Data',cfgHE);
rxDataSym = demod(info.DataIndices,:,:);

Recover the data bits subject to the specified estimates for CSI and noise variance, implementing normalized min-sum low-density parity-check (LDPC) decoding.

csi = ones(length(rxDataSym),1);
noiseVarEst = 10^(-snr/10);
dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,csi,cfgHE, ...
    'LDPCDecodingMethod','norm-min-sum');

Confirm that the recovered information bits match the transmitted PSDU.

isequal(dataBits,bits)
ans = logical
   1

Input Arguments

collapse all

Demodulated HE-Data field for a user, specified as a complex-valued array of size NSD-by-NSym-by-NSS.

  • NSD is the number of data subcarriers in the HE-Data field.

  • NSym is the number of OFDM symbols.

  • NSS is the number of spatial streams.

The contents and size of this input depend on the HE format specified in the cfgHE input.

Data Types: single | double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Data Types: single | double

Channel state information, specified as a real-valued array of size NSD-by-NSS.

  • NSD is the number of data subcarriers in the HE-Data field.

  • NSS is the number of spatial streams.

Data Types: single | double

HE transmission configuration, specified as an object of type wlanHESUConfig, wlanHEMUConfig, wlanHETBConfig, or wlanHERecoveryConfig.

User index, specified as an integer in the interval [1, 8].

Data Types: single | double

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'MaximumLDPCIterationCount','12','EarlyTermination','false' specifies a maximum of 12 LDPC decoding iterations and disables early termination so that the decoder completes the 12 iterations.

LDPC decoding algorithm, specified as the comma-separated pair consisting of 'LDPCDecodingMethod' and one of these values:

  • 'bp' — Use the belief propagation (BP) decoding algorithm. For more information, see Belief Propagation Decoding.

  • 'layered-bp' — Use the layered BP decoding algorithm, suitable for quasi-cyclic parity check matrices (PCMs). For more information, see Layered Belief Propagation Decoding.

  • 'norm-min-sum' — Use the layered BP decoding algorithm with the normalized min-sum approximation. For more information, see Normalized Min-Sum Decoding.

  • 'offset-min-sum' — Use the layered BP decoding algorithm with the offset min-sum approximation. For more information, see Offset Min-Sum Decoding.

Note

When you specify this input as 'norm-min-sum' or 'offset-min-sum', the function sets input log-likelihood ratio (LLR) values that are greater than 1e10 or less than -1e10 to 1e10 and -1e10, respectively. The function then uses these values when executing the LDPC decoding algorithm.

Dependencies

This argument applies when you specify the ChannelCoding property of the cfgHE input as 'LDPC' for the user corresponding to the userIdx input.

Data Types: char | string

Scaling factor for normalized min-sum LDPC decoding, specified as the name-value argument consisting of MinSumScalingFactor and a scalar in the interval (0, 1].

Dependencies

This argument applies when you specify the LDPCDecodingMethod name-value argument as "norm-min-sum".

Data Types: double

Offset for min-sum LDPC decoding, specified as the name-value argument consisting of MinSumOffset and a nonnegative scalar.

Dependencies

This argument applies when you specify the LDPCDecodingMethod name-value argument as offset-min-sum.

Data Types: double

Maximum number of LDPC decoding iterations, specified as the comma-separated pair consisting of 'MaximumLDPCIterationCount' and a positive integer.

Dependencies

This argument applies when you set the ChannelCoding property of the cfgHE input to 'LDPC' for the user corresponding to the userIdx input.

Data Types: double

Enable early termination of LDPC decoding, specified as the comma-separated pair consisting of 'EarlyTermination' and 1 (true) or 0 (false).

  • When you set this value to 0 (false), LDPC decoding completes the number of iterations specified in the 'MaximumLDPCIterationCount'' name-value pair argument regardless of parity check status.

  • When you set this value to 1 (true), LDPC decoding terminates when all parity checks are satisfied.

Dependencies

This argument applies when you set the ChannelCoding property of the cfgHE input to 'LDPC' for the user corresponding to the userIdx input.

Data Types: logical

Output Arguments

collapse all

Bits recovered from the HE-Data field, returned as a binary valued column vector of length 8 × LPSDU, where LPSDU is the PSDU length in bytes. Calculate the PSDU length by using the getPSDULength object function with the cfgHE input.

Data Types: int8

More About

collapse all

Algorithms

collapse all

This function supports these four LDPC decoding algorithms.

References

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

[2] Gallager, Robert G. Low-Density Parity-Check Codes. Cambridge, MA: MIT Press, 1963.

[3] Hocevar, D.E. "A Reduced Complexity Decoder Architecture via Layered Decoding of LDPC Codes." In IEEE Workshop on Signal Processing Systems, 2004. SIPS 2004., 107-12. Austin, Texas, USA: IEEE, 2004. https://doi.org/10.1109/SIPS.2004.1363033.

[4] Jinghu Chen, R.M. Tanner, C. Jones, and Yan Li. "Improved Min-Sum Decoding Algorithms for Irregular LDPC Codes." In Proceedings. International Symposium on Information Theory, 2005. ISIT 2005., 449-53, 2005. https://doi.org/10.1109/ISIT.2005.1523374.

Extended Capabilities

expand all

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

Version History

Introduced in R2018b

expand all