wlanFieldIndices
PPDU field indices
Syntax
Description
returns ind
= wlanFieldIndices(cfg
)ind
, a structure containing the start and stop indices of the
individual component fields that make up the baseband physical layer convergence procedure
protocol data unit (PPDU) waveform.
Note
For the non-high-throughput (non-HT) format, this function supports generation of field indices only for OFDM-modulated signals.
returns field indices for an oversampled transmission with the specified oversampling
factor. For more information about oversampling, see FFT-Based Oversampling.ind
= wlanFieldIndices(___,OversamplingFactor=osf
)
Examples
Recover Information Bits in HE-SIG-A Field
Create a WLAN HE SU configuration object with default settings and use it to generate a waveform.
cfgHE = wlanHESUConfig; cbw = cfgHE.ChannelBandwidth; waveform = wlanWaveformGenerator(1,cfgHE);
Get the WLAN field indices. Use them to isolate the HE-SIG-A field.
ind = wlanFieldIndices(cfgHE); rxSIGA = waveform(ind.HESIGA(1):ind.HESIGA(2),:);
Perform OFDM demodulation to extract the HE-SIG-A field.
sigaDemod = wlanHEDemodulate(rxSIGA,'HE-SIG-A',cbw);
Return the pre-HE OFDM information and use it to extract the demodulated HE-SIG-A data symbols.
preHEInfo = wlanHEOFDMInfo('HE-SIG-A',cbw);
siga = sigaDemod(preHEInfo.DataIndices,:);
Recover the HE-SIG-A information bits and other information, assuming no channel noise. Display the parity check result.
noiseVarEst = 0; [bits,failCRC] = wlanHESIGABitRecover(siga,noiseVarEst); disp(failCRC);
0
Extract VHT-STF From VHT Waveform
Create a VHT-format configuration object for a multiple-input/multiple-output (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 composed 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 dimension 640-by-2, corresponding to the number of samples (80 for each 20-MHz bandwidth segment) and the number of transmit antennas.
disp(size(stf))
640 2
Extract VHT-LTF and Recover VHT Data
Configure a VHT-format configuration 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 VHT-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
Return Field Indices for Oversampled HE MU Waveform
Create a WLAN HE MU configuration object and use it to generate an HE MU waveform with packet extension and an oversampling factor.
cfg = wlanHEMUConfig(192); cfg.User{1}.NominalPacketPadding = 16; bits = [1; 0; 0; 1]; osf = 3; waveform = wlanWaveformGenerator(bits,cfg,OversamplingFactor=osf);
Return and display the PPDU field indices.
ind = wlanFieldIndices(cfg,OversamplingFactor=osf); disp(ind)
LSTF: [1 480] LLTF: [481 960] LSIG: [961 1200] RLSIG: [1201 1440] HESIGA: [1441 1920] HESIGB: [1921 2400] HESTF: [2401 2640] HELTF: [2641 3600] HEData: [3601 11280] HEPE: [11281 11520]
Input Arguments
cfg
— Transmission format
wlanHESUConfig
object | wlanHEMUConfig
object | wlanHERecoveryConfig
object | wlanHETBConfig
object | wlanWURConfig
| wlanVHTConfig
object | wlanHTConfig
object | wlanNonHTConfig
object | wlanDMGConfig
object | wlanS1GConfig
object | wlanEHTMUConfig
object | wlanEHTTBConfig
object | wlanEHTRecoveryConfig
object
Transmission format, specified as one of these configuration objects: wlanHESUConfig
,
wlanHEMUConfig
,
wlanHERecoveryConfig
,
wlanHETBConfig
, wlanWURConfig
, wlanVHTConfig
, wlanHTConfig
, wlanNonHTConfig
, wlanDMGConfig
, wlanS1GConfig
, wlanEHTMUConfig
, wlanEHTTBConfig
, or wlanEHTRecoveryConfig
.
Example: cfg = wlanVHTConfig
field
— PPDU field name
character vector
PPDU field name, specified as a character vector. The valid set of values for this input
depends on the transmission format you specify in the cfg
input.
Transmission Format (cfg ) | Valid Field Name Values (field ) |
---|---|
wlanEHTMUConfig ,
wlanEHTTBConfig , or
wlanEHTRecoveryConfig |
|
wlanHESUConfig , wlanHEMUConfig ,
wlanHERecoveryConfig , or
wlanHETBConfig |
|
wlanWURConfig |
|
wlanDMGConfig |
|
When the | |
wlanS1GConfig |
|
For a 1-MHz or greater than 2-MHz short preamble configuration, additional
valid fields are | |
For a greater than 2-MHz long preamble configuration, additional valid fields
are | |
wlanVHTConfig |
|
wlanHTConfig |
|
wlanNonHTConfig |
|
Data Types: char
| string
osf
— Oversampling factor
1
(default) | scalar greater than or equal to 1
Oversampling factor, specified as a scalar greater than or equal to 1. The oversampled field indices must be integer-valued.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Output Arguments
ind
— Start and stop indices
structure | integer-valued matrix
Start and stop indices, returned as a structure or an integer-valued matrix. The indices
correspond to the start and stop indices of fields included in the baseband waveform
defined by the cfg
input.
If you specify the field
input, the function returns
ind
as an N-by-2 integer-valued matrix
consisting of the start and stop indices of the specified PPDU field. This table
outlines the N dimension of the N-by-2 matrix that
is returned based on the specific format and configuration.
Format | Configuration | ind or Specific Field Dimension |
---|---|---|
non-HT | — | 1-by-2 matrix for each field |
HT | — | 1-by-2 matrix for each field |
Null data packet (NDP) mode, if the PSDULength property of
wlanHTConfig object is 0 | Empty matrix | |
VHT and S1G | — | 1-by-2 matrix for each field |
NDP mode, if the APEPLength property of the
wlanVHTConfig or wlanS1GConfig object is
0 | Empty matrix | |
WUR | — | cfg .NumUsers -by-2 matrix when you
specify the field input as 'WUR-Sync' or
'WUR-Data' . Otherwise, 1-by-2 matrix for each
field. |
HE(1) | — | 1-by-2 matrix for each field |
NDP mode, if the APEPLength property of the
wlanHESUConfig or wlanHESUConfig object is
0 | Empty matrix | |
When a midamble is added to the HE-Data field to improve channel estimates for high-Doppler scenarios | R-by-2 matrix when you specify the
| |
DMG(2) | — | 1-by-2 matrix for each field |
When the TrainingLength property of
wlanDMGConfig object is positive | 1-by-2 matrix when you specify the field input as
'DMG-AGC' or 'DMG-TRN' | |
'DMG-AGCSubfields' is a TrainingLength -by-2
matrix | ||
TrainingLength -by-2 matrix when you specify the
field input as 'DMG-TRNSubfields' | ||
(TrainingLength /4)-by-2 matrix when you specify the
field input as 'DMG-TRNCE' | ||
When the TrainingLength property of
wlanDMGConfig object is 0 | Empty matrix when you specify the field input as
'DMG-AGC' , 'DMG-TRN' ,
'DMG-AGCSubfields' , 'DMG-TRNSubfields' ,
or 'DMG-TRNCE' | |
EHT | — | 1-by-2 matrix |
As described in section 27.3.12.16 of [1], you can add a midamble to the HE-Data field to improve the channel estimates for high-Doppler scenarios.
For DMG, the
'DMG-AGC'
field contains NTrainingLength subfields, where NTrainingLength is 0–64 subfields. The'DMG-TRN'
field contains NTrainingLength + (NTrainingLength/4) subfields. As shown in this figure, the indices for'DMG-AGC'
and'DMG-TRN'
overlap with the indices of their respective subfields,'DMG-AGCSubfields'
and'DMG-TRNSubfields'
.
Data Types: uint32
| struct
Algorithms
FFT-Based Oversampling
An oversampled signal is a signal sampled at a frequency that is higher than the Nyquist rate. WLAN signals maximize occupied bandwidth by using small guardbands, which can pose problems for anti-imaging and anti-aliasing filters. Oversampling increases the guardband width relative to the total signal bandwidth, which increases the number of samples in the signal.
This function performs oversampling by using a larger IFFT and zero pad when generating an OFDM waveform. This diagram shows the oversampling process for an OFDM waveform with NFFT subcarriers made up of Ng guardband subcarriers on either side of Nst occupied bandwidth subcarriers.
References
[1] IEEE® Std 802.11ax™-2021 (Amendment to IEEE Std 802.11™-2020). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 1: Enhancements for High Efficiency WLAN.” IEEE Standard for Information Technology — Telecommunications and Information Exchange between Systems. Local and Metropolitan Area Networks — Specific Requirements.
[2] IEEE Std 802.11-2020 (Revision of IEEE Std 802.11-2016). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.” IEEE Standard for Information Technology — Telecommunications and Information Exchange between Systems — Local and Metropolitan Area Networks — Specific Requirements.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2015bR2024b: Generate C/C++ code for EHT blind recovery
You can now generate C and C++ code using MATLAB®
Coder™ when you specify the cfg
input as a
wlanEHTRecoveryConfig
object.
R2023b: EHT recovery support
You can specify cfg
as an object of type
wlanEHTRecoveryConfig
.
R2023a: EHT field indices
You can specify cfg
as an object of type wlanEHTMUConfig
or
wlanEHTTBConfig
.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)