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.

wlanFieldIndices

Generate PPDU field indices

Syntax

ind = wlanFieldIndices(cfg)
ind = wlanFieldIndices(cfg,field)

Description

example

ind = wlanFieldIndices(cfg) returns a structure, ind, containing the start and stop indices of the individual component fields that comprise the baseband PPDU waveform, given a format configuration object.

Note

For non-HT format, this function only supports generation of field indices for OFDM modulation.

example

ind = wlanFieldIndices(cfg,field) returns the start and stop indices for the specified field type in the rows of an N-by-2 matrix.

Examples

collapse all

Extract the VHT-STF from a VHT waveform.

Create VHT configuration object for a MIMO transmission using a 160 MHz channel bandwidth. Generate the corresponding VHT waveform.

cfg = wlanVHTConfig('MCS',8,'ChannelBandwidth','CBW160','NumTransmitAntennas',2,'NumSpaceTimeStreams',2);
txSig = wlanWaveformGenerator([1;0;0;1],cfg);

Determine the component PPDU field indices for the VHT format.

ind = wlanFieldIndices(cfg)
ind = 

  struct with fields:

       LSTF: [1 1280]
       LLTF: [1281 2560]
       LSIG: [2561 3200]
    VHTSIGA: [3201 4480]
     VHTSTF: [4481 5120]
     VHTLTF: [5121 6400]
    VHTSIGB: [6401 7040]
    VHTData: [7041 8320]

The VHT PPDU waveform is comprised of eight fields, including seven preamble fields and one data field.

Extract the VHT-STF from the transmitted waveform.

stf = txSig(ind.VHTSTF(1):ind.VHTSTF(2),:);

Verify that the VHT-STF has dimensions of 640-by-2 corresponding to the number of samples (80 for each 20 MHz bandwidth segment) and the number of transmit antennas.

size(stf)
ans =

   640     2

Generate a VHT waveform. Extract and demodulate the VHT-LTF to estimate the channel coefficients. Recover the data field using the channel estimate and use this to determine the number of bit errors.

Configure a VHT format object with two paths.

vht = wlanVHTConfig('NumTransmitAntennas',2,'NumSpaceTimeStreams',2);

Generate a random PSDU and create the corresponding VHT waveform.

txPSDU = randi([0 1],8*vht.PSDULength,1);
txSig = wlanWaveformGenerator(txPSDU,vht);

Pass the signal through a TGac 2x2 MIMO channel.

tgacChan = wlanTGacChannel('NumTransmitAntennas',2,'NumReceiveAntennas',2, ...
    'LargeScaleFadingEffect','Pathloss and shadowing');
rxSigNoNoise = tgacChan(txSig);

Add AWGN to the received signal. Set the noise variance for the case in which the receiver has a 9 dB noise figure.

nVar = 10^((-228.6+10*log10(290)+10*log10(80e6)+9)/10);
awgnChan = comm.AWGNChannel('NoiseMethod','Variance','Variance',nVar);
rxSig = awgnChan(rxSigNoNoise);

Determine the indices for the VHT-LTF and extract the field from the received signal.

indVHT = wlanFieldIndices(vht,'VHT-LTF');
rxLTF = rxSig(indVHT(1):indVHT(2),:);

Demodulate the VHT-LTF and estimate the channel coefficients.

dLTF = wlanVHTLTFDemodulate(rxLTF,vht);
chEst = wlanVHTLTFChannelEstimate(dLTF,vht);

Extract the data field and recover the information bits.

indData = wlanFieldIndices(vht,'VHT-Data');
rxData = rxSig(indData(1):indData(2),:);
rxPSDU = wlanVHTDataRecover(rxData,chEst,nVar,vht);

Determine the number of bit errors.

numErrs = biterr(txPSDU,rxPSDU)
numErrs =

     0

Input Arguments

collapse all

Transmission format, specified as a wlanDMGConfig, wlanS1GConfig, wlanVHTConfig, wlanHTConfig, or wlanNonHTConfig configuration object.

Example: txformat = wlanVHTConfig

PPDU fieldname, specified as a character vector. The valid set of field values depends on the transmission format specified in cfg.

Transmission Format (cfg)Valid Fieldname Values (field)
wlanDMGConfig

'DMG-STF', 'DMG-CE', 'DMG-Header', and 'DMG-Data' are common for all DMG PHY configurations.

When the wlanDMGConfig property 'TrainingLength' > 0, additional valid fields include: 'DMG-AGC', 'DMG-AGCSubfields', 'DMG-TRN', 'DMG-TRNCE', and 'DMG-TRNSubfields'.

  • 'DMG-AGCSubfields' is returned in a matrix with TrainingLength rows

  • 'DMG-TRNCE' is returned in a matrix with TrainingLength/4 rows

  • 'DMG-TRNSubfields' is returned in a matrix with TrainingLength rows

wlanS1GConfig

'S1G-STF', 'S1G-LTF1', and 'S1G-Data' are common for all S1G configurations.

For a 1MHz, or ≥ 2MHz short preamble configuration, additional valid fields include 'S1G-SIG', or 'S1G-LTF2N'.

For ≥ 2MHz long preamble configuration, additional valid fields include 'S1G-SIG-A', 'S1G-DSTF', 'S1G-DLTF', or 'S1G-SIG-B'.

wlanVHTConfig

'L-STF', 'L-LTF', 'L-SIG', 'VHT-SIG-A', 'VHT-STF', 'VHT-LTF', 'VHT-SIG-B', or 'VHT-Data'

wlanHTConfig

'L-STF', 'L-LTF', 'L-SIG', 'HT-SIG', 'HT-STF', 'HT-LTF', or 'HT-Data'

wlanNonHTConfig

'L-STF', 'L-LTF', 'L-SIG', or 'NonHT-Data'

Data Types: char | string

Output Arguments

collapse all

Start and stop indices, returned as a structure or a matrix. The indices correspond to the start and stop indices of fields included in the baseband waveform defined by the specified WLAN format configuration object.

If you specify an input field, the function returns ind as an N-by-2 matrix of uint32 values, consisting of the start and stop indices of the PPDU field, where N is the number of rows.

This table outlines the N dimension of the N-by-2 matrix that is returned based on the specific format and configuration.

FormatConfigurationind or Specific Field Dimension

non-HT

1-by-2

HT

1-by-2
When null data packet (NDP) mode, if PSDULength = 0empty matrix

VHT

1-by-2
When null data packet (NDP) mode, if APEPLength = 0empty matrix

S1G

1-by-2
When null data packet (NDP) mode, if APEPLength = 0empty matrix

DMG

1-by-2
When the wlanDMGConfig object property 'TrainingLength' > 0'DMG-AGC' is a 1-by-2 matrix
'DMG-TRN' is a 1-by-2 matrix
'DMG-AGCSubfields' is a TrainingLength-by-2 matrix
'DMG-TRNSubfields' is a TrainingLength-by-2 matrix
'DMG-TRNCE' is a (TrainingLength/4)-by-2 matrix
When the wlanDMGConfig property 'TrainingLength' = 0'DMG-AGC' is a 0-by-2 matrix
'DMG-TRN' is a 0-by-2 matrix
'DMG-AGCSubfields' is a 0-by-2 matrix
'DMG-TRNSubfields' is a 0-by-2 matrix
'DMG-TRNCE' is a 0-by-2 matrix

The 'DMG-AGC' field contains NTrainingLength subfields, where NTrainingLength is 0 to 64 subfields. The 'DMG-TRN' field contains NTrainingLength + (NTrainingLength/4) subfields. As shown here, the indices for 'DMG-AGC' and 'DMG-TRN' overlap with those of their respective subfields, 'DMG-AGCSubfields' and 'DMG-TRNSubfields'.

References

[1] IEEE Std 802.11™-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.

[2] IEEE Std 802.11ac™-2013 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 4: Enhancements for Very High Throughput for Operation in Bands below 6 GHz.

[3] 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 R2015b

Was this topic helpful?