wlanDMGDataBitRecover

Recover data bits from DMG data field

Description

example

dataBits = wlanDMGDataBitRecover(rxDataSig,noiseVarEst,cfg) recovers the data bits given the data field from a DMG transmission (OFDM, single-carrier, or control PHY), the noise variance estimate, and the DMG configuration object.

example

dataBits = wlanDMGDataBitRecover(rxDataSig,noiseVarEst,csi,cfg) uses the channel state information specified in csi to enhance the demapping of OFDM subcarriers.

example

dataBits = wlanDMGDataBitRecover(___,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 information bits from the DMG Data field in a Control transmission.

Transmitter

Create a DMG configuration object with a modulation and coding scheme (MCS) for a Control PHY configuration.

cfgDMG = wlanDMGConfig('MCS',0);

Create the input sequence of data bits and generate the DMG waveform.

txBits = randi([0 1],cfgDMG.PSDULength*8,1,'int8'); 
tx = wlanWaveformGenerator(txBits,cfgDMG);

Receiver

Assume that the transmission passes through a noiseless channel.

rx = tx;

Extract the header and the data field by using the wlanFieldIndices function.

ind = wlanFieldIndices(cfgDMG);
rxSym = rx(ind.DMGHeader(1):ind.DMGData(2));

De-rotate the received signal by 90 degrees and despread it with a spreading factor of 32. Generate the Golay sequence by using the wlanGolaySequence function.

rxSym = rxSym.*exp(-1i*pi/2*(0:size(rxSym,1)-1).');
sf = 32; 
Ga = wlanGolaySequence(sf);
rxSymDespread = (reshape(rxSym,sf,length(rxSym)/sf)'*Ga)/sf;

Recover the PSDU from the DMG Data field.

rxBits = wlanDMGDataBitRecover(rxSymDespread,0,cfgDMG);

Confirm that the decoded bits match the original information bits.

disp(isequal(txBits,rxBits))
   1

Recover information bits from the DMG Data field of an OFDM transmission.

Transmitter

Create a DMG configuration object with a modulation and coding scheme (MCS) for OFDM PHY.

cfg = wlanDMGConfig('MCS',14);

Create the input sequence of data bits and generate a DMG waveform.

txBits = randi([0 1],8*cfg.PSDULength,1,'int8'); 
tx = wlanWaveformGenerator(txBits,cfg);

Channel

Set an SNR of 10 dB, calculate the noise power (noise variance), and add AWGN to the waveform.

snr = 10;
nVar = 10^(-snr/10);
rx = awgn(tx,snr);

Receiver

Extract the DMG data field.

ind = wlanFieldIndices(cfg);
rxData = rx(ind.DMGData(1):ind.DMGData(2));

Perform the OFDM demodulation on the received waveform, then extract the data subcarriers.

sym = wlanDMGOFDMDemodulate(rxData);
info = wlanDMGOFDMInfo;
rxSym = sym(info.DataIndices,:);

Recover the PSDU from the DMG Data field, assuming a CSI estimate of all ones.

csi = ones(length(info.DataIndices),1);
rxBits = wlanDMGDataBitRecover(rxSym,nVar,csi,cfg);

Confirm that the decoded bits match the original information bits.

disp(isequal(txBits,rxBits));
   1

Recover information bits from the DMG Data field in a single-carrier (SC) transmission.

Transmitter

Create a DMG configuration object with a modulation and coding scheme (MCS) for SC PHY.

cfg = wlanDMGConfig('MCS',10);

Create the input sequence of data bits and generate a DMG waveform.

txBits = randi([0 1],8*cfg.PSDULength,1,'int8'); 
tx = wlanWaveformGenerator(txBits,cfg);

AWGN Channel

Set an SNR of 10 dB, calculate the noise power (noise variance), and add AWGN to the waveform by using the awgn function.

SNR = 10;
nVar = 10^(-SNR/10);
rx = awgn(tx,SNR);

Receiver

Extract the data field.

ind = wlanFieldIndices(cfg);
rxData = rx(ind.DMGData(1):ind.DMGData(2));

Reshape the received data waveform into blocks. Set the data block size to 512 and the guard interval length to 64. Remove the last guard interval from the received data waveform. The resulting data waveform is a 512-by-Nblks matrix, where Nblks is the number of DMG data blocks.

blkSize = 512; 
Ngi = 64;
rxData = rxData(1:end-Ngi); 
rxData = reshape(rxData,blkSize,[]);

Remove the guard interval from each block. The resulting signal is a 448-by-Nblks matrix, as expected for the time-domain DMG Data field signal in an SC PHY configuration.

rxSym = rxData(Ngi+1:end,:);
disp(size(rxSym))
   448     9

Recover the PSDU from the DMG Data field, specifying layered belief propagation LDPC decoding.

rxBits = wlanDMGDataBitRecover(rxSym,nVar,cfg,'LDPCDecodingMethod','layered-bp');

Confirm that the decoded bits match the original information bits.

disp(isequal(txBits,rxBits))
   1

Input Arguments

collapse all

Received DMG data signal, specified as a real or complex matrix. The contents and size of rxDataSig depend on the physical layer (PHY):

  • Single-carrier PHY — rxDataSig is the time-domain DMG data field signal, specified as a 448-by-NBLKS matrix of real or complex values. The value 448 is the number of symbols in a DMG data symbol and NBLKS is the number of DMG data blocks.

  • OFDM PHY — rxDataSig is the demodulated DMG data field OFDM symbols, specified as a 336-by-NSYM matrix of real or complex values. The value 336 is the number of data subcarriers in the DMG data field and NSYM is the number of OFDM symbols.

  • Control PHY — rxDataSig is the time-domain signal containing the header and data fields, specified as an NB-by-1 column vector of real or complex values, where NB is the number of despread symbols.

Data Types: double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Data Types: double

DMG PPDU configuration, specified as a wlanDMGConfig object.

Channel state information, specified as a 336-by-1 real-valued column vector. The value 336 specifies the number of data subcarriers in the DMG data field. csi is required only for OFDM PHY.

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.

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.

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.

Data Types: logical

Output Arguments

collapse all

Recovered information bits from the DMG data field, returned as a binary-valued column vector of length 8 × cfgDMG.PSDULength. See wlanDMGConfig for PSDULength details.

Data Types: int8

More About

collapse all

DMG Data Field

The DMG format supports three physical layer (PHY) modulation schemes: control, single carrier, and OFDM. The data field is variable in length. It serves the same function for the three PHYs and carries the user data payload.

For SC PHY, each block in the data field is 512-symbols long and with a guard interval (GI) of 64 symbols with the Golay Sequence. For OFDM, each OFDM symbol in the data field are 640 samples long and with a cyclic prefix (CP) of 128 samples to prevent intersymbol interference.

IEEE 802.11ad™-2012 specifies the common aspects of the DMG PPDU packet structure in Section 21.3. The PHY modulation-specific aspects of the data field structure are specified in these sections:

  • The DMG control PHY packet structure is specified in Section 21.4.

  • The DMG OFDM PHY packet structure is specified in Section 21.5.

  • The DMG SC PHY packet structure is specified in Section 21.6.

Algorithms

collapse all

The wlanDMGDataBitRecover function supports these four LDPC decoding algorithms.

Belief Propagation Decoding

The wlanDMGDataBitRecover 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 log-likelihood ratio (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 wlanDMGDataBitRecover 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 wlanDMGDataBitRecover 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 wlanDMGDataBitRecover 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 STD 802.11ad-2012 (Amendment to IEEE Std 802.11™-2012, as amended by IEEE Std 802.11ae™-2012 and IEEE Std 802.11a™-2012). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 4: Enhancements for Very High Throughput Operation in Bands below 6 GHz.” 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

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

Introduced in R2017b