Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

wlanDMGHeaderBitRecover

Recover header bits from DMG header field

Syntax

[headerBits,failHCS] = wlanDMGHeaderBitRecover(rxHeader,noiseVarEst,cfg)
headerBits = wlanDMGHeaderBitRecover(rxHeader,noiseVarEst,csi,cfg)
headerBits = wlanDMGHeaderBitRecover(___,Name,Value)

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 = 

   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. The wlanDMGDataBitRecover function uses the following object properties:

Modulation and coding scheme index, specified as an integer from 0 to 24. The MCS index indicates the modulation and coding scheme used in transmitting the current packet.

  • Modulation and coding scheme for control PHY

    MCS IndexModulationCoding RateComment

    0

    DBPSK

    1/2

    Code rate and data rate might be lower due to codeword shortening.

  • Modulation and coding schemes for single-carrier modulation

    MCS IndexModulationCoding RateNCBPSRepetition

    1

    π/2 BPSK

    1/2

    1

    2

    2

    1/2

    1

    3

    5/8

    4

    3/4

    5

    13/16

    6

    π/2 QPSK

    1/2

    2

    7

    5/8

    8

    3/4

    9

    13/16

    10

    π/2 16QAM

    1/2

    4

    11

    5/8

    12

    3/4

    NCBPS is the number of coded bits per symbol.

  • Modulation and coding schemes for OFDM modulation

MCS IndexModulationCoding RateNBPSCNCBPSNDBPS

13

SQPSK

1/2

1

336

168

14

5/8

210

15

QPSK

1/2

2

672

336

16

5/8

420

17

3/4

504

18

16QAM

1/2

4

1344

672

19

5/8

840

20

3/4

1008

21

13/16

1092

22

64QAM

5/8

6

2016

1260

23

3/4

1512

24

13/16

1638

NBPSC is the number of coded bits per single carrier.

NCBPS is the number of coded bits per symbol.

NDBPS is the number of data bits per symbol.

Data Types: double

Number of training fields, specified as an integer from 0 to 64. TrainingLength must be a multiple of four.

Data Types: double

Packet training field type, specified as 'TRN-R' or 'TRN-T'. This property applies when TrainingLength > 0.

'TRN-R' indicates that the packet includes or requests receive-training subfields and 'TRN-T' indicates that the packet includes transmit-training subfields.

Data Types: char | string

Request beam tracking, specified as a logical. Setting BeamTrackingRequest to true indicates that beam tracking is requested. This property applies when TrainingLength > 0.

Data Types: logical

Tone pairing type, specified as 'Static' or 'Dynamic'. This property applies when MCS is from 13 to 17. Specifically, TonePairingType applies when using OFDM and either SQPSK or QPSK modulation.

Data Types: char | string

DTP group pair index, specified as a 42-by-1 integer vector for each pair. Element values must be from 0 to 41, with no duplicates. This property applies when MCS is from 13 to 17 and when TonePairingType is 'Dynamic'.

Data Types: double

DTP update indicator, specified as a logical. Toggle DTPIndicator between packets to indicate that the dynamic tone pair mapping has been updated. This property applies when MCS is from 13 to 17 and when TonePairingType is 'Dynamic'.

Data Types: logical

Number of bytes carried in the user payload, specified as an integer from 1 to 262,143.

Data Types: double

Initial scrambler state of the data scrambler for each packet generated, specified as an integer from 1 to 127. When MCS is 0, the initial scrambler state is limited to values from 1 to 15. The default value of 2 is the example state given in IEEE Std 802.11™-2012, Amendment 3, Section L.5.2.

Data Types: double | int8

MPDU aggregation indicator, specified as a logical. Setting AggregatedMPDU to true indicates that the current packet uses A-MPDU aggregation.

Data Types: logical

Received power level of the last packet, specified as an integer from 0 to 15.

When transmitting a response frame immediately following a short interframe space (SIFS) period, a DMG STA sets the LastRSSI as specified in IEEE® 802.11ad™-2012, Section 9.3.2.3.3, to map to the TXVECTOR parameter LAST_RSSI of the response frame to the power that was measured on the received packet, as reported in the RCPI field of the frame that elicited the response frame. The encoding of the value for TXVECTOR is as follows:

  • Power values equal to or above –42 dBm are represented as the value 15.

  • Power values between –68 dBm and –42 dBm are represented as round((power – (–71 dBm))/2).

  • Power values less than or equal to –68 dBm are represented as the value of 1.

  • For all other cases, the DMG STA shall set the TXVECTOR parameter LAST_RSSI of the transmitted frame to 0.

The LAST_RSSI parameter in RXVECTOR maps to LastRSSI and indicates the value of the LAST_RSSI field from the PCLP header of the received packet. The encoding of the value for RXVECTOR is as follows:

  • A value of 15 represents power greater than or equal to –42 dBm.

  • Values from 2 to 14 represent power levels (–71+value×2) dBm.

  • A value of 1 represents power less than or equal to –68 dBm.

  • A value of 0 indicates that the previous packet was not received during the SIFS period before the current transmission.

For more information, see IEEE 802.11ad-2012, Section 21.2.

Data Types: double

Turnaround indication, specified as a logical. Setting Turnaround to true indicates that the STA is required to listen for an incoming PPDU immediately following the transmission of the PPDU. For more information, see IEEE 802.11ad-2012, Section 9.3.2.3.3.

Data Types: logical

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 single 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.

collapse all

Maximum number of LDPC decoding iterations, specified as the comma-separated pair consisting of 'MaximumLDPCIterationCount' and a positive integer.

Data Types: double

Enable early termination of LDPC decoding, specified as the comma-separated pair consisting of 'EarlyTermination' and a logical.

  • 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.

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

Introduced in R2017b

Was this topic helpful?