Main Content

wlanHEDataBitRecover

Recover bits from HE-Data field

Description

example

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,cfgHE) recovers dataBits, a column vector of bits, from rxDataSym, the equalized OFDM symbols that comprise 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).

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.

example

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.

Examples

collapse all

Recover bits from the HE-Data field of an HE SU transmission.

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;       % Channel bandwidth of transmission

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

Recover bits from the HE-Data field of an HE SU waveform transmitted though an additive white Gaussian noise (AWGN) channel.

cfgHE = wlanHESUConfig('MCS',11);

Generate a transmit waveform containing eight data packets.

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, assuming a CSI estimate of ones.

csi = ones(length(rxDataSym),1);    % Assume CSI estimate of all ones
noiseVarEst = 10^(-snr/10);         % Noise variance estimate
dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,csi,cfgHE);

Confirm that the recovered bits match the transmitted bits.

isequal(bits,dataBits)
ans = logical
   1

Recover bits from the HE-Data field of an HE MU waveform transmitted through an AWGN channel.

Configure an HE MU transmission for two users, specifying a channel bandwidth of 20 MHz and two 106-tone resource units (RUs).

AllocationIndex = 96;
cfgHE = wlanHEMUConfig(AllocationIndex);

Specify the MCS for both users and an APEP length for the second user.

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

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.

allocationInfo = ruInfo(cfgHE);
for userIdx = 1:allocationInfo.NumUsers
    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

Recover bits from the HE-Data field of an HE TB waveform transmitted through an AWGN channel.

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: double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Data Types: 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: 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: double

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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

To enable this argument, 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 comma-separated pair consisting of 'MinSumScalingFactor' and a scalar in the interval (0, 1].

Dependencies

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

Data Types: double

Offset for offset min-sum LDPC decoding, specified as the comma-separated pair consisting of 'MinSumOffset' and a nonnegative scalar.

Dependencies

To enable this argument, specify the 'LDPCDecodingMethod' name-value pair 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

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

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

HE-Data Field

The HE-Data field of the HE PPDU contains data for one or more users.

As described in [1], the number of OFDM symbols in the HE-Data field depends on the length value of the legacy signal (L-SIG) field in accordance with equation (27-11), the preamble duration, and the settings of the GI+LTF Size, Pre-FEC Padding Factor, and PE Disambiguity subfields of the HE-SIG-A field in accordance with section 27.3.10.7.

  • Data symbols in an HE PPDU use a discrete Fourier transform (DFT) period of 12.8 μs and subcarrier spacing of 78.125 kHz.

  • Data symbols in an HE PPDU support GI durations of 0.8 μs, 1.6 μs, and 3.2 μs.

  • HE PPDUs have single-stream pilots in the HE-Data field.

When the transmission uses BCC encoding, the HE-Data field consists of the SERVICE field, the PSDU, the pre-FEC padding bits, the tail bits, and the post-FEC padding bits.

When the transmission uses LDPC encoding, the HE-Data field consists of the SERVICE field, the PSDU, the pre-FEC padding bits, the post-FEC padding bits, and the packet extension (PE) field.

For more information, see WLAN PPDU Structure and 802.11ax Parameterization for Waveform Generation and Simulation.

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.

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 pair argument. When you specify the 'EarlyTermination' name-value pair argument 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 pair 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 pair 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 pair argument. This equation is an adaptation of equation (5) presented in [4].

References

[1] IEEE P802.11ax™/D4.1. “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 1: Enhancements for High Efficiency WLAN.” Draft 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

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

Introduced in R2018b