wlanHEDataBitRecover

Recover data bits from HE-Data field

Description

example

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,cfg) recovers dataBits, the HE-Data bits in a high-efficiency single-user (HE SU) transmission.

The function recovers dataBits from rxDataSym, the equalized HE-Data OFDM symbols. The cfg input parameterizes the transmission, which is subject to noise variance estimate noiseVarEst.

example

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,csi,cfg)returns the recovered data bits using the channel state information csi to enhance the demapping of OFDM subcarriers.

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,cfg,userIdx) returns the recovered data bits for the specified user of a high-efficiency multi-user (HE MU) transmission, as determined by the user index userIdx.

example

dataBits = wlanHEDataBitRecover(rxDataSym,noiseVarEst,csi,cfg,userIdx) returns the recovered data bits for the specified user of an HE MU transmission, using the channel state information to enhance the demapping of OFDM subcarriers.

example

dataBits = wlanHEDataBitRecover(___,Name,Value) specifies algorithm options by using one or more name-value pair arguments. When you do not specify a name-value pair, the function uses the default value.

Examples

collapse all

Recover the HE-Data field for an HE-SU-format packet by decoding the HE signaling fields, updating the unknown properties in the recovery configuration object, and passing the updated object into the HE-Data recovery function.

Create an HE-SU-format configuration object, specifying the MCS, and extract the channel bandwidth.

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

Generate a waveform for the specified configuration object.

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 an HE-SU-format packet.

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.

[~,~,lsigInfo] = wlanLSIGBitRecover(lsig,0);
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.

cfgRx = interpretHESIGABits(cfgRx,sigaBits);
ind = wlanFieldIndices(cfgRx);

Retrieve and decode the HE-Data field.

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

Check that the returned data bits are the same as the transmitted data bits.

isequal(bits,dataBits)
ans = logical
   1

Recover HE data from a single-user HE packet waveform transmitted though an AWGN channel.

cfgHE = wlanHESUConfig('MCS',11);

Generate a transmit waveform containing eight data packets.

msgLen = getPSDULength(cfgHE)*8;
txBits = randi([0 1],msgLen,1,'int8');
txWaveform = wlanWaveformGenerator(txBits,cfgHE);

Add noise to the waveform.

snr = 30;
rxWaveform = awgn(txWaveform,snr);

Extract the data field.

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

Assuming 20-MHz channel bandwidth and 3.2-microsecond guard interval, OFDM demodulate the received waveform and extract the data-carrying subcarriers.

Nfft = 256; % FFT length (20 MHz)
Ncp = 64;   % Cyclic prefix length (3.2 us at 20 MHz)
pilotSC = [-116; -90; -48; -22; 22; 48; 90; 116]; % Pilot indices
ruSC = [-122:-2 2:122].'; % Active subcarrier indices
nullIdx = setdiff((-Nfft/2:(Nfft/2-1)).',ruSC)+Nfft/2+1;
pilotIdx = pilotSC+Nfft/2+1;
sf = (1/sqrt(numel(ruSC)))*Nfft; % Scaling factor
rxSym = ofdmdemod(rxData,Nfft,Ncp,Ncp,nullIdx,pilotIdx)/sf;

Recover the data bits.

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

Compare the recovered bits to the original information bits.

disp(isequal(txBits,rxBits));
   1

Decode the HE-Data field for each user in an OFDMA transmission.

Waveform Generation

Create a multiuser HE object and packet configuration.

allocationIndex = 96; % Two 106-tone RUs, two users, 20 MHz
cfg = wlanHEMUConfig(allocationIndex);
cfg.User{1}.MCS = 4;
cfg.User{2}.APEPLength = 1e3;
cfg.User{2}.MCS = 7;

Generate random data based on the specific PSDU length per user.

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

Generate an OFDMA waveform signal and add AWGN to the signal.

txWaveform = wlanWaveformGenerator(txBits,cfg);
snr = 25;
rxWaveform = awgn(txWaveform,snr);

Receiver Processing per User

Using the PPDU field indices structure, extract the HE-Data field for each user.

ind = wlanFieldIndices(cfg)
ind = struct with fields:
      LSTF: [1 160]
      LLTF: [161 320]
      LSIG: [321 400]
     RLSIG: [401 480]
    HESIGA: [481 640]
    HESIGB: [641 880]
     HESTF: [881 960]
     HELTF: [961 1280]
    HEData: [1281 6720]
      HEPE: [0x2 double]

rxData = rxWaveform(ind.HEData(1):ind.HEData(2),:);       

For each user, OFDM demodulate and extract data-carrying subcarriers assuming 20-MHz channel bandwidth, and 3.2-microsecond guard interval for the appropriate resource unit (RU).

for userIdx = 1:numUsers
   Nfft = 256; % FFT length (20 MHz)
   Ncp = 64;  % Cyclic prefix length (3.2 us at 20 MHz)
   pilotSC = [-116; -90; -48; -22; 22; 48; 90; 116]; % Pilot indices
   if userIdx==1
      ruSC = (-122:-17).'; % Active subcarrier indices RU #1
   else
      ruSC = (17:122).'; % Active subcarrier indices RU #2
   end
   nullIdx = setdiff((-Nfft/2:(Nfft/2-1)).',ruSC)+Nfft/2+1;
   pilotIdx = pilotSC(ismember(pilotSC,ruSC))+Nfft/2+1;
   sf = (1/sqrt(2*numel(ruSC)))*Nfft; % Scaling factor
   rxSym = ofdmdemod(rxData,Nfft,Ncp,Ncp,nullIdx,pilotIdx)/sf;        
  
   % Recover data bits and compare with transmitted
   csi = ones(length(rxSym),1); % Assume CSI estimate of all ones
   nVar = 10^(-snr/10); % Noise variance
   rxBits = wlanHEDataBitRecover(rxSym,nVar,csi,cfg,userIdx);
   disp(isequal(rxBits,txBits{userIdx}))
end
   1

   1

Generate an HE TB packet, pass through an AWGN channel, then demodulate and recover the HE-Data field from the received waveform.

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

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

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

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

Extract the data field from the received waveform.

ind = wlanFieldIndices(cfgHE);
rxData = rxWaveform(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 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.

disp(isequal(dataBits,psdu))
   1

Input Arguments

collapse all

Equalized HE-Data field OFDM symbols for a user, specified as an NSD-by-NSym-by-NSS complex-valued array. NSD is the number of data subcarriers in the HE-Data field, NSym is the number of OFDM symbols, and NSS is the number of spatial streams. The contents and size of rxDataSym depend on the HE PPDU format configuration.

Data Types: double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Data Types: double

Channel state information, specified as an NST-by-NSS real-valued matrix. NST is the number of subcarriers and NSS is the number of spatial streams.

Data Types: double

HE format 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 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 wlanHEDataBitRecover 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 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 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 a positive integer.

Dependencies

To enable this argument, set the ChannelCoding property of the cfg name-value pair argument to 'LDPC' for the user corresponding to the userIdx input.

Data Types: double

Enable early termination of LDPC decoding, specified as 1 (true) or 0 (false).

  • When you set this value to 0 (false), LDPC decoding completes the number of iterations specified by 'MaximumLDPCIterationCount' 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, specify the ChannelCoding property of the cfg input as 'LDPC' for the user corresponding to the userIdx input.

Data Types: logical

Output Arguments

collapse all

Recovered information bits in the HE-Data field, returned as an 8-by-LPSDU column vector, where LPSDU is the PSDU length. You can determine the PSDU length by using the getPSDULength function.

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 is determined by the length value of the legacy signal (L-SIG) field (see Equation (27-11)), the preamble duration and the settings of the GI+LTF Size, Pre-FEC Padding Factor, and PE Disambiguity fields in the HE-SIG-A field (see 27.3.10.7 (HE-SIG-A)).

  • 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 guard interval durations of 0.8 μs, 1.6 μs, and 3.2 μs.

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

When BCC encoding is used, the HE-Data field consists of the SERVICE field, the PSDU, the pre-FEC PHY padding bits, the tail bits, and the post-FEC padding bits. Packet extension is assumed to be zero.

When LDPC encoding is used, the HE-Data field consists of the SERVICE field, the PSDU, the pre-FEC PHY padding bits, the post-FEC padding bits, and the packet extension. No tail bits are present when LDPC encoding is used.

For more information, see WLAN PPDU Structure and Build HE PPDU.

Algorithms

collapse all

The wlanHEDataBitRecover function supports these four LDPC decoding algorithms.

Belief Propagation Decoding

The wlanHEDataBitRecover 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 wlanHEDataBitRecover 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 wlanHEDataBitRecover 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 wlanHEDataBitRecover 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