Generate non-HT-Data field waveform



y = wlanNonHTData(psdu,cfg) generates the non-HT-Data field[1] time-domain waveform for the input PSDU bits.

y = wlanNonHTData(psdu,cfg,scramInit) uses scramInit for the scrambler initialization state.


collapse all

Generate the waveform for a 20MHz non-HT-Data field for 36 Mbps.

Create a non-HT configuration object and assign MCS to 5.

cfg = wlanNonHTConfig('MCS',5);

Assign random data to the PSDU and generate the data field waveform.

psdu = randi([0 1],cfg.PSDULength*8,1);
y = wlanNonHTData(psdu,cfg);
ans = 1×2

        4480           1

Input Arguments

collapse all

PLCP service data unit (PSDU), specified as an Nbits-by-1 vector, where Nbits = PSDULength × 8. PSDU vector can range from 1 byte to 4095 bytes, as specified by PSDULength.

Data Types: double

Format configuration, specified as a wlanNonHTConfig object. The wlanNonHTData function uses the wlanNonHTConfig object properties associated with the 'OFDM' setting for Modulation.

Non-HT Format Configuration

Channel bandwidth in MHz for OFDM, specified as 'CBW20', 'CBW10', or 'CBW5'. The default value of 'CBW20' sets the channel bandwidth to 20 MHz.

When channel bandwidth is 5 MHz or 10 MHz, only one transmit antenna is permitted and NumTransmitAntennas is not applicable.

Data Types: char | string

OFDM modulation and coding scheme to use for transmitting the current packet, specified as an integer from 0 to 7. The system configuration associated with an MCS setting maps to the specified data rate.

MCSModulationCoding RateCoded bits per subcarrier (NBPSC)Coded bits per OFDM symbol (NCBPS)Data bits per OFDM symbol (NDBPS)Data Rate (Mbps)
20 MHz channel bandwidth10 MHz channel bandwidth5 MHz channel bandwidth

See IEEE Std 802.11™-2012, Table 18-4.

Data Types: double

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

Data Types: double

Number of transmit antennas for OFDM, specified as a scalar integer from 1 to 8.

When channel bandwidth is 5 MHz or 10 MHz, NumTransmitAntennas is not applicable because only one transmit antenna is permitted.

Data Types: double

Scrambler initialization state for each packet generated, specified as an integer from 1 to 127 or as the corresponding binary vector of length seven. The default value of 93 is the example state given in IEEE Std 802.11-2012, Section L.1.5.2.

The scrambler initialization used on the transmission data follows the process described in IEEE® Std 802.11-2012, Section and IEEE Std 802.11ad™-2012, Section 21.3.9. The header and data fields that follow the scrambler initialization field (including data padding bits) are scrambled by XORing each bit with a length-127 periodic sequence generated by the polynomial S(x) = x7+x4+1. The octets of the PSDU (Physical Layer Service Data Unit) are placed into a bit stream, and within each octet, bit 0 (LSB) is first and bit 7 (MSB) is last. The generation of the sequence and the XOR operation are shown in this figure:

Conversion from integer to bits uses left-MSB orientation. For the initialization of the scrambler with decimal 1, the bits are mapped to the elements shown.

Bit Value0000001

To generate the bit stream equivalent to a decimal, use de2bi. For example, for decimal 1:

ans =

     0     0     0     0     0     0     1

Example: [1; 0; 1; 1; 1; 0; 1] conveys the scrambler initialization state of 93 as a binary vector.

Data Types: double | int8

Output Arguments

collapse all

Non-HT-Data field time-domain waveform, returned as an NS-by-NT matrix. NS is the number of time domain samples, and NT is the number of transmit antennas.

More About

collapse all


Physical layer convergence procedure (PLCP) service data unit (PSDU). This field is composed of a variable number of octets. The minimum is 0 (zero) and the maximum is 2500. For more information, see IEEE Std 802.11™-2012, Section

non-HT-Data field

The non-high throughput data (non-HT data) field is used to transmit MAC frames and is composed of a service field, a PSDU, tail bits, and pad bits.

  • Service field — Contains 16 zeros to initialize the data scrambler.

  • PSDU — Variable-length field containing the PLCP service data unit (PSDU).

  • Tail — Tail bits required to terminate a convolutional code. The field uses six zeros for the single encoding stream.

  • Pad Bits — Variable-length field required to ensure that the non-HT data field contains an integer number of symbols.


collapse all

non-HT-Data Field Processing

The non-HT-Data field follows the L-SIG in the packet structure. For algorithm details, refer to IEEE Std 802.11-2012 [1], Section 18.3.5. The non-HT-Data field includes the user payload in the PSDU plus 16 service bits, 6 tail bits, and additional padding bits as required to fill out the last OFDM symbol. The wlanNonHTData function performs transmitter processing on the non-HT-Data field and outputs the time-domain waveform.


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