Main Content

wlanEHTDataBitRecover

Recover bits from EHT-Data field

Since R2023a

Description

dataBits = wlanEHTDataBitRecover(rxDataSym,noiseVarEst,cfg,userIdx) recovers dataBits, a column vector of bits, from rxDataSym, the equalized OFDM symbols that make up the EHT-Data field of an extremely high-throughput multi-user (EHT MU) or trigger-based (EHT TB) transmission. The function recovers dataBits by using the noise variance estimate noiseVarEst and EHT transmission parameters cfg. The userIdx is the 1-based index of the user whose data bits are decoded by the function. This argument is not necessary when the PPDU type is non-OFDMA and the number of users is one.

example

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

example

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

example

Examples

collapse all

Create an OFDMA EHT MU configuration object, setting the allocation index to a row vector of length 16 with all entries equal to 64. This setting specifies a configuration with 16 users in a channel bandwidth of 320 MHz. Each user has a 242-tone RU.

allocationIndex = ones(1,16);
allocationIndex = 64*allocationIndex;
cfg = wlanEHTMUConfig(allocationIndex);

Make the last RU unassigned by setting the STAID property of the last user to 2046.

cfg.User{end}.STAID=2046;

Get the PSDU length of the configuration.

cfgLength = psduLength(cfg);

Generate a random sequence of bits to transmit for each user.

numUsers = numel(cfg.User);
txBits = cell(1,numUsers);
for i=1:numUsers
    txBits{i} = randi([0 1],8*cfgLength(i),1,"int8");
end

Generate a time-domain waveform for the configuration and bits.

tx = wlanWaveformGenerator(txBits,cfg);

Pass the waveform through an AWGN channel with a signal-to-noise ratio of 10 dB.

snr = 10;
rx = awgn(tx,snr);

Generate field indices for the EHT-Data field and extract the part of the received waveform that corresponds to it.

ind = wlanFieldIndices(cfg,"EHT-Data");
ehtData = rx(ind(1):ind(2),:);

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

info = ruInfo(cfg);
decodeStatus = zeros(1,15);
for userIdx = 1:info.NumUsers
    if ~info.RUAssigned(userIdx)
        continue
    end
    ruNumber = info.RUNumbers(userIdx);
    sym = wlanEHTDemodulate(ehtData,"EHT-Data",cfg,ruNumber);

Use the configuration's OFDM information to extract the part of the demodulated EHT-Data field that contains the data subcarriers.

    ofdmInfo = wlanEHTOFDMInfo("EHT-Data",cfg,ruNumber);
    rxDataSym = sym(ofdmInfo.DataIndices,:,:);

Calculate the noise power.

    noiseVarEst = 10^(-snr/10);

Recover the data bits, using belief propagation low-density parity-check (LDPC) decoding. Confirm that the recovered bits match the transmitted bits.

    dataBits = wlanEHTDataBitRecover(rxDataSym,noiseVarEst,cfg,userIdx, ...
    LDPCDecodingMethod="bp");
    decodeStatus(userIdx) = isequal(txBits{userIdx},dataBits);
end
disp(all(decodeStatus));
   1

Create an EHT TB config object with default parameters.

cfg = wlanEHTTBConfig;

Get the OFDM information for the EHT-Data field.

info = wlanEHTOFDMInfo("EHT-Data",cfg);

Get the PSDU length of the configuration.

cfgLength = psduLength(cfg);

Generate a random sequence of bits to transmit.

txBits = randi([0 1],cfgLength*8,1,"int8");

Generate a time-domain waveform for the configuration and bits.

tx = wlanWaveformGenerator(txBits,cfg);

Pass the waveform through an AWGN channel with a signal-to-noise ratio of 30 dB.

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

Generate field indices for the EHT-Data field and extract the part of the received waveform that corresponds to it.

ind = wlanFieldIndices(cfg,"EHT-Data");
ehtData = rx(ind(1):ind(2),:);

Demodulate the EHT-Data field.

demod = wlanEHTDemodulate(ehtData,"EHT-Data",cfg);

Use the configuration's OFDM information to extract the part of the demodulated EHT-Data field that contains the data subcarriers.

rxDataSym = demod(info.DataIndices,:,:);

Calculate the noise power.

noiseVarEst = 10^(-snr/10);

Recover the data bits, using belief propagation low-density parity-check (LDPC) decoding. Confirm that the recovered bits match the transmitted bits.

dataBits = wlanEHTDataBitRecover(rxDataSym,noiseVarEst,cfg, ...,
    LDPCDecodingMethod="bp");
disp(isequal(txBits,dataBits))
   1

Create a non-OFDMA EHT MU configuration object with a channel bandwidth of 320 MHz.

cfg = wlanEHTMUConfig("CBW320");

Get the OFDM information for the EHT-Data field.

info = wlanEHTOFDMInfo("EHT-Data",cfg);

Use the psduLength object function to get the PSDU length of the configuration in bytes. Multiply by eight to convert to bits.

psduBytes = psduLength(cfg);
psduBits = psduBytes*8;

Generate a random sequence of bits with the same length as the PSDU length of the configuration.

txBits = randi([0 1],psduBits,1);

Generate a time-domain waveform for the configuration and bits.

tx = wlanWaveformGenerator(txBits,cfg);

Pass the waveform through an AWGN channel with a signal-to-noise ratio of 30 dB.

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

Generate field indices for the EHT-Data field and extract the part of the received waveform that corresponds to it.

ind = wlanFieldIndices(cfg,"EHT-Data");
ehtData = rx(ind(1):ind(2),:);

Demodulate the EHT-Data field.

demod = wlanEHTDemodulate(ehtData,"EHT-Data",cfg);

Use the configuration's OFDM information to extract the part of the demodulated EHT-Data field that contains the data subcarriers.

rxData = demod(info.DataIndices,:,:);

Calculate the noise power.

noiseVarEst = 10^(-snr/10);

Recover the bits from the EHT-Data field, assuming a channel state information estimate of ones. Confirm that the recovered bits match the transmitted bits.

csi = ones(length(rxData),1);
dataBits = wlanEHTDataBitRecover(rxData,noiseVarEst,csi,cfg);
disp(isequal(txBits,dataBits))
   1

Input Arguments

collapse all

Demodulated EHT-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 EHT-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 EHT format specified in the cfg 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 EHT-Data field.

  • NSS is the number of spatial streams.

Data Types: single | double

Physical layer (PHY) format configuration, specified as an object of type wlanEHTMUConfig, wlanEHTTBConfig, or wlanEHTRecoveryConfig.

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

Note

  • For an EHT MU OFDMA or non-OFDMA PPDU, specify this input as the 1-based index of the user whose data you want to decode.

  • For an EHT MU non-OFDMA PPDU with a single user, this input is not required.

  • For an EHT TB PPDU, this input is not required.

  • This input is not required when you specify cfg as a wlanEHTRecoveryConfig object.

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 name-value argument consisting of LDPCDecodingMethod and one of these values:

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

  • "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.

  • "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 cfg 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 name-value argument consisting of 'MaximumLDPCIterationCount' and a positive integer.

Dependencies

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

Data Types: single | double

Enable early termination of LDPC decoding, specified as the name-value argument 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 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 cfg input to "LDPC" for the user corresponding to the userIdx input.

Data Types: logical

Output Arguments

collapse all

Bits recovered from the EHT-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 psduLength object function with the cfg input.

Data Types: int8

Algorithms

collapse all

This function supports these four LDPC decoding algorithms.

References

[1] IEEE® P802.11be™/D5.0. “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, https://ieeexplore.ieee.org/document/10381585

[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 R2023a

expand all