wlanDMGHeaderBitRecover

Recover header bits from DMG header field

Description

example

[headerBits,failHCS] = wlanDMGHeaderBitRecover(rxHeader,noiseVarEst,cfg) recovers the header information bits and tests the header check sequence (HCS) given the header field from a DMG transmission (OFDM, single-carrier, or control PHY), the noise variance estimate, and the DMG configuration object.

example

headerBits = wlanDMGHeaderBitRecover(rxHeader,noiseVarEst,csi,cfg) uses the channel state information specified in csi to enhance the demapping of OFDM subcarriers.

headerBits = wlanDMGHeaderBitRecover(___,Name,Value) specifies additional options using name-value pair arguments, using the inputs from preceding syntaxes. When a name-value pair is not specified, its default value is used.

Examples

collapse all

Recover header bits from the DMG header field of the single-carrier (SC) PHY.

Transmitter

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

cfgDMG = wlanDMGConfig('MCS',10);

Create the input sequence of bits, specifying it as a column vector with cfgDMG.PSDULength*8 elements. Generate the DMG transmission waveform.

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

AWGN Channel

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

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

Receiver

Extract the header field by using the wlanFieldIndices function.

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

Reshape the received 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 header waveform. The resulting signal is a 448-by-2 matrix.

blkSize = 512;
rxHeader = reshape(rxHeader,blkSize,[]);
Ngi = 64;
rxSym = rxHeader(Ngi+1:end,:);
size(rxSym)
ans = 1×2

   448     2

Recover header bits from DMG header field.

[rxBits,failHCS] = wlanDMGHeaderBitRecover(rxSym,nVar,cfgDMG);

Display the HCS check on the recovered header bits.

disp(failHCS);
   0

Recover header information bits from the DMG header field of the OFDM PHY.

Transmitter

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

cfgDMG = wlanDMGConfig('MCS',14);

Create the input sequence of data bits, specifying it as a column vector with cfgDMG.PSDULength*8 elements. Generate the DMG transmission waveform.

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

Channel

Transmit the signal through a channel with no noise (zero noise variance).

rx = tx;
nVar = 0;

Receiver

Extract data field using the wlanFieldIndices function.

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

Set the FFT length to 512 and the cyclic prefix length to 128 for the OFDM demodulation.

Nfft = 512;
Ncp = 128;

Perform the OFDM demodulation. Remove cyclic prefix, scale the sequence by the active tone 352, and extract the frequency domain symbols.

dftSym = rxHeader(Ncp+1:end,:);    
dftSym = dftSym/(Nfft/sqrt(352));       
freqSym = fftshift(fft(dftSym,[],1),1); 

Extract data-carrying subcarriers and discard the pilots. Set the highest subcarrier index to 177.

pilotSCIndex = [-150; -130; -110; -90; -70; -50; -30; -10; 10; 30; 50; 70; 90; 110; 130; 150];
noDataSCIndex = [pilotSCIndex; [-1; 0; 1]];
Nsr = 177; 
dataSCIndex = setdiff((-Nsr:Nsr).',sort(noDataSCIndex));
rxSym = freqSym(dataSCIndex+(Nfft/2+1),:);

Recover the header bits from the DMG header field. Assume a CSI estimation of all ones.

csi = ones(length(dataSCIndex),1);
[rxBits,failHCS] = wlanDMGHeaderBitRecover(rxSym,nVar,csi,cfgDMG);

Display the HCS check on the recovered header bits.

disp(failHCS);
   0

Recover header information bits of the DMG header field from the control PHY.

Transmitter

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

cfgDMG = wlanDMGConfig('MCS',0);

Create the input sequence of data bits, specifying it as a column vector with cfgDMG.PSDULength*8 elements. Generate the DMG transmission waveform.

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

Channel

Transmit the signal through a channel with no noise (zero noise variance).

rx = tx;
nVar = 0;

Receiver

Extract the header field by using the wlanFieldIndices function.

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

De-rotate the received signal by pi/2 and despread it with a spreading factor of 32. Use the wlanGolaySequence function to generate the Golay sequence.

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

Recover the header bits from the DMG header field.

[rxBits,failHCS] = wlanDMGHeaderBitRecover(rxDespread,nVar,cfgDMG);

Display the HCS check on the recovered header bits.

disp(failHCS);
   0

Input Arguments

collapse all

Received DMG header field signal, specified as a real or complex matrix. The contents and size of rxHeader depends on the physical layer (PHY):

  • Single-Carrier PHY — rxHeader is the time-domain DMG header 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 header symbol and NBLKS is the number of DMG header blocks.

  • OFDM PHY — rxHeader is the frequency-domain signal, specified as a 336-by-1 column vector of real or complex values. The value 336 is the number of data subcarriers in the DMG header field.

  • Control PHY — rxHeader is the time-domain signal containing the header field, specified as an NB-by-1 column vector of real or complex values. 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 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 decoding iterations for the LDPC and disables early termination of LDPC decoding so that it completes the 12 iterations.

Maximum number of decoding iterations in low-density parity check (LDPC), specified as a positive integer. This argument applies when channel coding is set to LDPC for the user of interest.

For information on channel coding options, see the 802.11™ format configuration object of interest.

Data Types: double

Enable early termination of LDPC decoding, specified as a logical value of 1 (true) or 0 (false). This property applies when channel coding is set to LDPC for the user of interest.

  • When set to false, LDPC decoding completes the number of iterations specified by MaximumLDPCIterationCount, regardless of parity check status.

  • When set to true, LDPC decoding terminates when all parity-checks are satisfied.

For information on channel coding options, see the 802.11 format configuration object of interest.

Data Types: logical

Output Arguments

collapse all

Recovered header information bits, returned as a column vector of 64 elements for OFDM and single-carrier PHYs and a column vector of 40 elements for control PHYs.

Data Types: int8

HCS check, returned as a logical. When headerBits fails the HCS check, failHCS is true.

Data Types: logical

More About

collapse all

DMG Header Field

In the DMG format, the header field is different in size and content for every supported physical layer (PHY) modulation scheme. This field contains additional important information for the receiver.

The total size of the header field is 40 bits for control PHYs and 64 bits for SC and OFDM PHYs.

The most important fields common for the three PHY modes are:

  • Scrambler initialization — Specifies the initial state for the scrambler.

  • MCS — Specifies the modulation and coding scheme used in the data field. It is not present in control PHY.

  • Length (data) — Specifies the length of the data field.

  • Packet type — Specifies whether the beamforming training field is intended for the receiver or the transmitter.

  • Training length — Specifies whether a beamforming training field is used and if so, its length.

  • HCS — Provides a checksum per CRC for the header.

IEEE 802.11ad™-2012 specifies the detailed aspects of the DMG header field structure. In particular, the PHY modulation-specific aspects of the header field are specified in these sections:

  • The DMG control PHY header structure is specified in Section 21.4.3.2.

  • The DMG OFDM PHY header structure is specified in Section 21.5.3.1.

  • The DMG SC PHY header structure is specified in Section 21.6.3.1.

References

[1] IEEE Std 802.11ad™-2012 IEEE Standard for Information technology — Telecommunications and information exchange between systems — Local and metropolitan area networks — Specific requirements — Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications — Amendment 3: Enhancements for Very High Throughput in the 60 GHz Band.

Extended Capabilities

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

Introduced in R2017b