# wlanNonHTData

Generate non-HT-Data field waveform

## Syntax

## Description

generates an oversampled non-HT Data field waveform for the specified oversampling
factor. For more information about oversampling, see FFT-Based Oversampling.`y`

= wlanNonHTData(___,OversamplingFactor=`osf`

)

## Examples

### Generate Non-HT-Data Waveform

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); size(y)

`ans = `*1×2*
4480 1

### Generate Data Field Signal of Non-HT Transmission

Configure transmission parameters by creating a `wlanNonHTConfig`

object, specifying a channel bandwidth of 80 MHz and static bandwidth operation.

cfg = wlanNonHTConfig('ChannelBandwidth','CBW80','SignalChannelBandwidth',true, ... 'BandwidthOperation','Static');

Generate a random PSDU of the appropriate length.

`psdu = randi([0 1],8*cfg.PSDULength,1,'int8');`

Generate the initial pseudorandom scrambler sequence.

[range,numBits] = scramblerRange(cfg); scramInit = randi(range);

Generate the non-HT Data field signal.

y = wlanNonHTData(psdu,cfg,scramInit);

## Input Arguments

`cfg`

— Non-HT transmission parameters

`wlanNonHTConfig`

object

Non-HT transmission parameters, specified as a `wlanNonHTConfig`

object.

`scramInit`

— Initial scrambler state or initial pseudorandom scrambler sequence

`93`

(default) | integer in the interval [1, 127] | binary-valued column vector

Initial scrambler state or initial pseudorandom scrambler sequence for each generated packet.

When you disable bandwidth signaling by setting the
`SignalchannelBandwidth`

property of the
`cfg`

input to `0`

(`false`

), this input represents the initial scrambler
state. In this case, this input must be an integer in the interval [1, 127],
or as the corresponding binary-valued column vector of length seven. The
default value, `93`

, is the example state in section
I.1.5.2 of [1].

When you enable bandwidth signaling by setting the
`SignalchannelBandwidth`

property of the
`cfg`

input to `1`

(`true`

), this input represents the pseudorandom
scrambler sequence described in Table 17-7 of [1]. In this case,
this input must be an integer in the interval [*min*,
*max*], or the corresponding binary-valued column
vector of length *N*_{B}. The values of
*min*, *max*, and
*N*_{B} depend on the values of the
`BandwidthOperation`

and
`ChannelBandwidth`

properties of the
`cfg`

input according to this table.

Value of
`cfg` `.` `BandwidthOperation` | Value of
`cfg` `.` `ChannelBandwidth` | Value of min | Value of max | Value of
N_{B} |
---|---|---|---|---|

`'Absent'` | `'CBW20'` | 1 | 31 | 5 |

`'Absent'` | `'CBW5'` ,
`'CBW10'` , `'CBW40'` ,
`'CBW80'` , or
`'CBW160'` | 0 | 31 | 5 |

`'Static'` or
`'Dynamic'` | `'CBW20'` | 1 | 15 | 4 |

`'Static'` or
`'Dynamic'` | `'CBW5'` ,
`'CBW10'` , `'CBW40'` ,
`'CBW80'` , or
`'CBW160'` | 0 | 15 | 4 |

If you do not specify this input, the function uses the
*N*_{B} most significant bits of
the default value, `93`

.

Section 17.3.5.5 of [1] specifies the
scrambling and descrambling process applied to the transmitted data. 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)* =
*x*^{7} +
*x*^{4} +
1. The octets of the PSDU are placed into a bit stream, and,
within each octet, bit 0 (LSB) is first and bit 7 (MSB) is last. This figure
demonstrates the sequence generation and XOR operation.

Conversion from integer to bits uses left-MSB orientation.
For example, initializing the scrambler with decimal `1`

,
the bits map to these elements.

Element | X^{7} | X^{6} | X^{5} | X^{4} | X^{3} | X^{2} | X^{1} |
---|---|---|---|---|---|---|---|

Bit Value | 0 | 0 | 0 | 0 | 0 | 0 | 1 |

To generate the bit stream equivalent to a decimal, use the
`int2bit`

function. For example, for decimal
`1`

:

int2bit(1,7)' 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`

`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 cyclic prefix length must be an integer number of samples.

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `int64`

| `uint8`

| `uint16`

| `uint32`

| `uint64`

## Output Arguments

`y`

— Non-HT Data field time-domain waveform

complex-valued matrix

Non-HT Data field time-domain waveform, returned as a complex-valued
matrix of size
*N*_{S}-by-*N*_{T}.

*N*_{S}is the number of time domain samples*N*_{T}is the number of transmit antennas.

**Data Types: **`double`

**Complex Number Support: **Yes

## More About

### PSDU

Physical layer (PHY) 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 15.3.5.7.

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

## Algorithms

### Non-HT Data Field Processing

The non-HT Data field follows the L-SIG in the packet. For algorithm details, refer to section 17.3.5 of [1]. The non-HT Data includes the user payload in the PSDU plus 16 service bits, six tail bits, and additional padding bits as required to fill out the last OFDM symbol. The function performs transmitter processing on the non-HT Data field and generates the time-domain waveform.

### 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
*N*_{FFT} subcarriers made up of
*N*_{g} guardband subcarriers on either side of
*N*_{st} 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 R2015b**

## 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)