Generate HT-STF waveform



y = wlanHTSTF(cfg) generates an HT-STF[1] time-domain waveform for HT-mixed format transmissions, given the parameters specified in cfg.


collapse all

Create a wlanHTConfig object with a 40 MHz bandwidth.

cfg = wlanHTConfig('ChannelBandwidth','CBW40');

Generate an HT-STF. The function returns a complex output of 160 samples.

stf = wlanHTSTF(cfg);
ans = 1×2

   160     1

Change the channel bandwidth to 20 MHz and create a new HT-STF.

cfg.ChannelBandwidth = 'CBW20';
stf = wlanHTSTF(cfg);

Verify that the number of samples has been halved due to the bandwidth reduction.

ans = 1×2

    80     1

Input Arguments

collapse all

Format configuration, specified as a wlanHTConfig object. The wlanHTSTF function uses these properties.

Channel bandwidth in MHz, specified as 'CBW20' or 'CBW40'.

Data Types: char | string

Number of transmit antennas, specified as 1, 2, 3, or 4.

Data Types: double

Number of space-time streams in the transmission, specified as 1, 2, 3, or 4.

Data Types: double

Spatial mapping scheme, specified as 'Direct', 'Hadamard', 'Fourier', or 'Custom'. The default value 'Direct' applies when NumTransmitAntennas and NumSpaceTimeStreams are equal.

Data Types: char | string

Spatial mapping matrix, specified as a scalar, matrix, or 3-D array. Use this property to rotate and scale the constellation mapper output vector. This property applies when the SpatialMapping property is set to 'Custom'. The spatial mapping matrix is used for beamforming and mixing space-time streams over the transmit antennas.

  • When specified as a scalar, NumTransmitAntennas = NumSpaceTimeStreams = 1 and a constant value applies to all the subcarriers.

  • When specified as a matrix, the size must be (NSTS + NESS)-by-NT. NSTS is the number of space-time streams. NESS is the number of extension spatial streams. NT is the number of transmit antennas. The spatial mapping matrix applies to all the subcarriers. The first NSTS and last NESS rows apply to the space-time streams and extension spatial streams respectively.

  • When specified as a 3-D array, the size must be NST-by-(NSTS + NESS)-by-NT. NST is the sum of the data and pilot subcarriers, as determined by ChannelBandwidth. NSTS is the number of space-time streams. NESS is the number of extension spatial streams. NT is the number of transmit antennas. In this case, each data and pilot subcarrier can have its own spatial mapping matrix.

    The table shows the ChannelBandwidth setting and the corresponding NST.


The calling function normalizes the spatial mapping matrix for each subcarrier.

Example: [0.5 0.3; 0.4 0.4; 0.5 0.8] represents a spatial mapping matrix having three space-time streams and two transmit antennas.

Data Types: double
Complex Number Support: Yes

Output Arguments

collapse all

HT-STF waveform, returned as an NS-by-NT matrix. NS is the number of samples, and NT is the number of transmit antennas.

Data Types: double
Complex Number Support: Yes

More About

collapse all


The high throughput short training field (HT-STF) is located between the HT-SIG and HT-LTF fields of an HT-mixed packet. The HT-STF is 4 μs in length and is used to improve automatic gain control estimation for a MIMO system. For a 20 MHz transmission, the frequency sequence used to construct the HT-STF is identical to that of the L-STF. For a 40 MHz transmission, the upper subcarriers of the HT-STF are constructed from a frequency-shifted and phase-rotated version of the L-STF.


As described in IEEE Std 802.11™-2012, Section 20.1.4, high throughput mixed (HT-mixed) format packets contain a preamble compatible with IEEE Std 802.11-2012, Section 18 and Section 19 receivers. Non-HT (Section 18 and Section19) STAs can decode the non-HT fields (L-STF, L-LTF, and L-SIG). The remaining preamble fields (HT-SIG, HT-STF, and HT-LTF) are for HT transmission, so the Section 18 and Section 19 STAs cannot decode them. The HT portion of the packet is described in IEEE Std 802.11-2012, Section Support for the HT-mixed format is mandatory.


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

Extended Capabilities

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

Introduced in R2015b

[1] IEEE® Std 802.11-2012 Adapted and reprinted with permission from IEEE. Copyright IEEE 2012. All rights reserved.