wlanVHTDemodulate
Description
Examples
Create a VHT configuration object with default parameters. Generate a time-domain waveform for the configuration.
cfg = wlanVHTConfig; tx = wlanWaveformGenerator([1;0;0;1],cfg);
Pass the waveform through an AWGN channel with a signal-to-noise ratio of 20 dB.
snr = 20; rx = awgn(tx,snr);
Get indices for the VHT-LTF. Use the indices to isolate the part of the received waveform that corresponds to the VHT-LTF.
field = "VHT-LTF";
ind = wlanFieldIndices(cfg,field);
rx = rx(ind(1):ind(2),:);
Demodulate the VHT-LTF.
sym = wlanVHTDemodulate(rx,field,cfg);
Create a VHT configuration object with a channel bandwidth of 160 MHz.
cfg = wlanVHTConfig(ChannelBandwidth="CBW160");
Generate a time-domain waveform for the configuration, specifying an oversampling factor of 2
.
osf = 2; tx = wlanWaveformGenerator([1;0;0;1],cfg,OversamplingFactor=osf);
Pass the waveform through an AWGN channel with a signal-to-noise ratio of 10 dB.
snr = 10; rx = awgn(tx,snr);
Get indices for the VHT-SIG-A field, specifying the oversampling factor. Use the indices to isolate the part of the received waveform that corresponds to the VHT-SIG-A field.
field = "VHT-SIG-A";
ind = wlanFieldIndices(cfg,field,OversamplingFactor=osf);
rx = rx(ind(1):ind(2),:);
Demodulate the VHT-SIG-A field, specifying the oversampling factor.
sym = wlanVHTDemodulate(rx,field,cfg,OversamplingFactor=osf);
Input Arguments
Received time-domain signal, specified as a complex-valued matrix of size Ns-by-Nr.
Ns is the number of time-domain samples. If Ns is not an integer multiple of the number of OFDM symbols, Ls, in the specified field, then the function ignores the remaining
mod(Ns,Ls)
symbols.Nr is the number of receive antennas.
Data Types: double
| single
Complex Number Support: Yes
Field to be demodulated, specified as one of these values:
"L-LTF"
— Demodulate the legacy long training field (L-LTF)."L-SIG"
— Demodulate the legacy signal (L-SIG) field."VHT-SIG-A"
— Demodulate the VHT signal A (VHT-SIG-A) field."VHT-LTF"
— Demodulate the VHT long training field (VHT-LTF)."VHT-SIG-B"
— Demodulate the VHT signal B (VHT-SIG-B) field."VHT-Data"
— Demodulate the VHT-Data Field.
Data Types: char
| string
Physical layer (PHY) format configuration, specified as a wlanVHTConfig
object.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: OversamplingFactor=2
Oversampling factor, specified as a scalar greater than or equal to 1. The oversampled cyclic prefix length must be an integer number of samples. For more information, see FFT-Based Oversampling.
OFDM symbol sampling offset, specified as a scalar in the interval [0, 1]. The scalar represents the sampling offset as a fraction of the cyclic prefix length.
The value that you specify indicates the start location for OFDM demodulation relative to the beginning of the cyclic prefix.
Example: 0.45
Data Types: double
| single
Output Arguments
Demodulated frequency-domain signal, returned as a complex-valued array of size Nsc-by-Nsym-by-Nr.
Nsc is the number of active occupied subcarriers in the demodulated field.
Nsym is the number of OFDM symbols.
Nr is the number of receive antennas.
Data Types: double
Complex Number Support: Yes
More About
The L-LTF is the second field in the 802.11™ OFDM PLCP legacy preamble. The L-LTF is a component of EHT, HE, VHT, HT, and non-HT PPDUs.
Channel estimation, fine frequency offset estimation, and fine symbol timing offset estimation rely on the L-LTF.
The L-LTF is composed of a cyclic prefix (CP) followed by two identical long training symbols (C1 and C2). The CP consists of the second half of the long training symbol.
The L-LTF duration varies with channel bandwidth.
Channel Bandwidth (MHz) | Subcarrier Frequency Spacing ΔF (kHz) | Fast Fourier Transform (FFT) Period (TFFT = 1 / ΔF) | Cyclic Prefix or Training Symbol Guard Interval (GI2) Duration (TGI2 = TFFT / 2) | L-LTF Duration (TLONG = TGI2 + 2 × TFFT) |
---|---|---|---|---|
20, 40, 80, 160, and 320 | 312.5 | 3.2 μs | 1.6 μs | 8 μs |
10 | 156.25 | 6.4 μs | 3.2 μs | 16 μs |
5 | 78.125 | 12.8 μs | 6.4 μs | 32 μs |
The L-SIG is the third field of the 802.11 OFDM PLCP legacy preamble. This field is a component of EHT, HE, VHT, HT, and non-HT PPDUs. It consists of 24 bits that contain rate, length, and parity information. The L-SIG field uses BPSK modulation with rate 1/2 binary convolutional coding (BCC).
The L-SIG consists of one OFDM symbol with a duration that varies with channel bandwidth.
Channel Bandwidth (MHz) | Subcarrier Frequency Spacing ΔF (kHz) | Fast Fourier Transform (FFT) Period (TFFT = 1 / ΔF) | Guard Interval (GI) Duration (TGI = TFFT / 4) | L-SIG Duration (TSIGNAL = TGI + TFFT) |
---|---|---|---|---|
20, 40, 80, 160, and 320 | 312.5 | 3.2 μs | 0.8 μs | 4 μs |
10 | 156.25 | 6.4 μs | 1.6 μs | 8 μs |
5 | 78.125 | 12.8 μs | 3.2 μs | 16 μs |
The L-SIG contains packet information for the received configuration.
Bits 0 through 3 specify the data rate (modulation and coding rate) for the non-HT format.
Rate (Bits 0–3) Modulation Coding Rate (R)
Data Rate (Mb/s) 20 MHz Channel Bandwidth 10 MHz Channel Bandwidth 5 MHz Channel Bandwidth 1101 BPSK 1/2 6 3 1.5 1111 BPSK 3/4 9 4.5 2.25 0101 QPSK 1/2 12 6 3 0111 QPSK 3/4 18 9 4.5 1001 16-QAM 1/2 24 12 6 1011 16-QAM 3/4 36 18 9 0001 64-QAM 2/3 48 24 12 0011 64-QAM 3/4 54 27 13.5 For HT and VHT formats, the L-SIG rate bits are set to
'1 1 0 1'
. Data rate information for HT and VHT formats is signaled in format-specific signaling fields.Bit 4 is reserved for future use.
Bits 5 through 16:
For non-HT formats, specify the data length (amount of data transmitted in octets) as described in Table 17-1 and Section 10.27.4 IEEE® Std 802.11-2020.
For HT-mixed formats, specify the transmission time as described in Sections 19.3.9.3.5 and 10.27.4 of IEEE Std 802.11-2020.
For VHT formats, specify the transmission time as described in Section 21.3.8.2.4 of IEEE Std 802.11-2020.
Bit 17 has the even parity of bits 0 through 16.
Bits 18 through 23 contain all zeros for the signal tail bits.
Note
Signaling fields added for HT (wlanHTSIG
)
and VHT (wlanVHTSIGA
, wlanVHTSIGB
) formats provide data rate
and configuration information for those formats.
For the HT-mixed format, Section 19.3.9.4.3 of IEEE Std 802.11-2020 describes HT-SIG bit settings.
For the VHT format, Sections 21.3.8.3.3 and 21.3.8.3.6 of IEEE Std 802.11-2020 describe bit settings for the VHT-SIG-A and VHT-SIG-B fields, respectively.
The very high throughput signal A (VHT-SIG-A) field contains information required to interpret VHT format packets. Similar to the non-HT signal (L-SIG) field for the non-HT OFDM format, this field stores the actual rate value, channel coding, guard interval, MIMO scheme, and other configuration details for the VHT format packet. Unlike the HT-SIG field, this field does not store the packet length information. Packet length information is derived from L-SIG and is captured in the VHT-SIG-B field for the VHT format.
For a detailed description of the VHT-SIG-A field, see Section 21.3.8.3.3 of IEEE Std 802.11-2016. The VHT-SIG-A field consists of two symbols: VHT-SIG-A1 and VHT-SIG-A2. These symbols are located between the L-SIG and the VHT-STF portion of the VHT format PPDU.
The VHT-SIG-A field includes the following components. The bit field structures for VHT-SIG-A1 and VHT-SIG-A2 vary for single-user or multi-user transmissions.
BW — A two-bit field that indicates 0 for 20 MHz, 1 for 40 MHz, 2 for 80 MHz, or 3 for 160 MHz.
STBC — A bit that indicates the presence of space-time block coding.
Group ID — A six-bit field that indicates the group and user position assigned to a STA.
NSTS — A three-bit field for a single user or 4 three-bit fields for a multi-user scenario that indicates the number of space-time streams per user.
Partial AID — An identifier that combines the association ID and the BSSID.
TXOP_PS_NOT_ALLOWED — An indicator bit that shows whether client devices are allowed to enter dose state. This bit is set to false when the VHT-SIG-A structure is populated, indicating that the client device is allowed to enter dose state.
Short GI — A bit that indicates use of the 400 ns guard interval.
Short GI NSYM Disambiguation — A bit that indicates if an extra symbol is required when the short GI is used.
SU/MU[0] Coding — A bit field that indicates if convolutional or LDPC coding is used for a single user or for user MU[0] in a multi-user scenario.
LDPC Extra OFDM Symbol — A bit that indicates if an extra OFDM symbol is required to transmit the data field.
MCS — A four-bit field.
For a single-user scenario, it indicates the modulation and coding scheme used.
For a multi-user scenario, it indicates the use of convolutional or LDPC coding and the MCS setting is conveyed in the VHT-SIG-B field.
Beamformed — An indicator bit set to 1 when a beamforming matrix is applied to the transmission.
CRC — An eight-bit field used to detect errors in the VHT-SIG-A transmission.
Tail — A six-bit field used to terminate the convolutional code.
The very high throughput long training field (VHT-LTF) is between the VHT-STF and VHT-SIG-B portion of the VHT packet.
Receivers use this field for MIMO channel estimation and pilot subcarrier tracking. The VHT-LTF includes one VHT long training symbol for each spatial stream indicated by the selected modulation and coding scheme (MCS). Each symbol is 4 μs long. The VHT-LTF consists of eight symbols at most.
For a detailed description of the VHT-LTF, see Section 21.3.8.3.5 of IEEE Std 802.11-2016.
Receivers use the very high throughput signal B (VHT-SIG-B) field in multi-user scenarios to set up the data rate and to fine-tune MIMO reception. The field uses MCS 0 and consists of a single OFDM symbol.
The VHT-SIG-B field is located between the VHT-LTF and the data portion of the VHT format PPDU.
The VHT-SIG-B field contains the actual rate and A-MPDU length value per user. For a detailed description of the VHT-SIG-B field, see Section 21.3.8.3.6 of IEEE Std 802.11-2016. The number of bits in the VHT-SIG-B field varies with the channel bandwidth. The assignment of the bits depends on whether there is a single user or multiple users. For single-user configurations, the same information is available in the L-SIG field, but the VHT-SIG-B field is included for continuity purposes.
Field | VHT MU PPDU Allocation (bits) | VHT SU PPDU Allocation (bits) | Description | ||||
---|---|---|---|---|---|---|---|
20 MHz | 40 MHz | 80 MHz, 160 MHz | 20 MHz | 40 MHz | 80 MHz, 160 MHz | ||
VHT-SIG-B | B0–15 (16) | B0–16 (17) | B0–18 (19) | B0–16 (17) | B0–18 (19) | B0–20 (21) | This variable-length field indicates the size of the data payload in four-byte units. The length of the field depends on the channel bandwidth. |
VHT-MCS | B16–19 (4) | B17–20 (4) | B19–22 (4) | N/A | N/A | N/A | This four-bit field is included for multi-user scenarios only. |
Reserved | N/A | N/A | N/A | B17–19 (3) | B19–20 (2) | B21–22 (2) | All ones |
Tail | B20–25 (6) | B21–26 (6) | B23–28 (6) | B20–25 (6) | B21–26 (6) | B23–28 (6) | This six bit field contains all zeros to terminate the convolutional code. |
Total number of bits | 26 | 27 | 29 | 26 | 27 | 29 | N/A |
Bit field repetition | 1 | 2 | 4 | 1 | 2 | 4 | For 160 MHz, the 80 MHz channel repeats twice. |
For a null data packet (NDP), the VHT-SIG-B bits are set according to Table 21-15 of IEEE Std 802.11-2016.
The VHT-Data field carries one or more frames from the medium access control (MAC) layer. This field follows the VHT-SIG-B field in a VHT PPDU.
For a detailed description of the VHT-Data field, see section 21.3.10 of IEEE Std 802.11-2020. The VHT Data field consists of four subfields.
Service field — Contains a seven-bit scrambler initialization state, one bit reserved for future considerations, and eight bits for the VHT-SIG-B cyclic redundancy check (CRC) field
PSDU — Variable-length field containing a PLCP service data unit
PHY Pad — Variable number of bits passed to the transmitter to create a complete OFDM symbol
Tail — Bits required to terminate a convolutional code (not required when the transmission uses LDPC channel coding)
Algorithms
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.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 R2025a
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: United States.
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)