Main Content

wlanEHTDataBitRecover

Recover bits from EHT-Data field

Since R2023a

Description

example

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) transmission. The function recovers dataBits by using the noise variance estimate noiseVarEst and EHT MU 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.

Examples

collapse all

Recover bits from the EHT-Data field of an EHT MU transmission.

Create an OFDMA EHT MU configuration object, setting the allocation index to a row vector of 16 zeros. This setting specifies a configuration with 144 users in a channel bandwidth of 320 MHz. Each user has a 26-tone RU. Extract the index numbers of the last user and their RU.

allocationIndex = zeros(1,16);
cfg = wlanEHTMUConfig(allocationIndex);
lastRU = numel(cfg.RU);
lastUser = numel(cfg.User);

Get the OFDM information for the last RU and the EHT-Data field.

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

Get the PSDU length of the configuration, and extract the PSDU length of the last RU.

cfgLength = psduLength(cfg);
ruLength = cfgLength(lastRU);

Generate a random sequence of bits to transmit.

txBits = randi([0 1],ruLength*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 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),:);

Demodulate the EHT-Data field at the last RU.

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

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);

Set the user index property for data bit recovery.

userIdx = lastUser;

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");
disp(isequal(txBits,dataBits))
   1

Recover bits from the EHT-Data field of an EHT TB transmission.

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

Recover bits from the EHT-Data field of an EHT MU transmission using channel state information.

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

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

To enable this argument, 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

To enable this argument, specify the 'LDPCDecodingMethod' name-value argument as "norm-min-sum".

Data Types: double

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

Dependencies

To enable this argument, 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

To enable this argument, 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

To enable this argument, 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.

Belief Propagation Decoding

The function implements the BP algorithm based on the decoding algorithm presented in [2]. For transmitted LDPC-encoded codeword c=(c0,c1,,cn1), the input to the LDPC decoder is the LLR given by

L(ci)=log(Pr(ci=0|channel output for ci)Pr(ci=0|channel output for ci)).

In each iteration, the function updates the key components of the algorithm based on these equations:

L(rji)=2atanh(iVj\{i}tanh(12L(qij))),

L(qij)=L(ci)+j'Ci\{j}L(rji), initialized as L(qij)=L(ci) before the first iteration, and

L(Qi)=L(ci)+jCiL(rji).

At the end of each iteration, L(Qi) is an updated estimate of the LLR value for the transmitted bit, ci. The value L(Qi) is the soft-decision output for ci. If L(Qi) is negative, the hard-decision output for ci is 1. Otherwise, the output is 0.

Index sets Ci\{j} and Vj\{i} are based on the PCM such that the sets Ci and Vj correspond to all nonzero elements in column i and row j of the PCM, respectively.

This figure demonstrates how to compute these index sets for PCM H for the case i = 5 and j = 3.

PCM H calculation

To avoid infinite numbers in the algorithm equations, atanh(1) and atanh(–1) are set to 19.07 and –19.07, respectively. Due to finite precision, MATLAB® returns 1 for tanh(19.07) and –1 for tanh(–19.07).

When you specify the 'EarlyTermination' name-value pair argument as 0 (false), the decoding terminates after the number of iterations specified by the 'MaximumLDPCIterationCount' name-value argument. When you specify 'EarlyTermination' as 1 (true), the decoding terminates when all parity checks are satisfied (HcT=0) or after the number of iterations specified by the 'MaximumLDPCIterationCount' name-value argument.

Layered Belief Propagation Decoding

The function implements the layered BP algorithm based on the decoding algorithm presented in Section II.A of [3]. The decoding loop iterates over subsets of rows (layers) of the PCM.

For each row, m, in a layer and each bit index, j, the implementation updates the key components of the algorithm based on these equations.

(1) L(qmj)=L(qj)Rmj

(2) Ψ(x)=log(|tanh(x/2)|)

(3) Amj=nN(m)\{j}Ψ(L(qmn))

(4) smj=nN(m)\{j}sgn(L(qmn))

(5) Rmj=smjΨ(Amj)

(6) L(qj)=L(qmj)+Rmj

For each layer, the decoding equation (6) works on the combined input obtained from the current LLR inputs, L(qmj), and the previous layer updates, Rmj.

Because the layered BP algorithm updates only a subset of the nodes in a layer, this algorithm is faster than the BP algorithm. To achieve the same error rate as attained with BP decoding, use half the number of decoding iterations when using the layered BP algorithm.

Normalized Min-Sum Decoding

The function implements the normalized min-sum decoding algorithm by following the layered BP algorithm with equation (3) replaced by

Amj=minnN(m)\{j}(α|L(qmn)|),

where α is the scaling factor specified by the 'MinSumScalingFactor' name-value argument. This equation is an adaptation of equation (4) presented in [4].

Offset Min-Sum Decoding

The function implements the offset min-sum decoding algorithm by following the layered BP algorithm with equation (3) replaced by

Amj=max(minnN(m)\{j}(|L(qmn)|β), 0),

where β is the offset specified by the 'MinSumOffset' name-value argument. This equation is an adaptation of equation (5) presented in [4].

References

[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

Version History

Introduced in R2023a

expand all