Main Content


This example shows how to build VHT PPDUs by using the WLAN waveform generator function or by building each field individually, then concatenating.

You can create a VHT, HT, or non-HT PPDU waveform by generating and concatenating waveforms for individual PPDU fields.

This list shows which functions you can use to build a PPDU for each PHY format.

Generate VHT Waveform Using Waveform Generator Function

Create a VHT configuration object.

cfgVHT = wlanVHTConfig;

Generate the VHT PPDU. The length of the input data sequence in bits must be eight times the length of the PSDU, which is expressed in bytes. Turn off windowing.

bits = randi([0 1],cfgVHT.PSDULength*8,1);
y = wlanWaveformGenerator(bits,cfgVHT,WindowTransitionTime=0);

Plot the magnitude of the waveform.

fsVHT = wlanSampleRate(cfgVHT.ChannelBandwidth);
time = (0:length(y)-1)/fsVHT;
xlabel ('Time (seconds)')

Figure contains an axes object. The axes object contains an object of type line.

Build VHT Waveform From Individual PPDU Fields

Create L-STF, L-LTF, L-SIG, VHT-SIG-A, VHT-STF, VHT-LTF, and VHT-SIG-B preamble fields.

lstf = wlanLSTF(cfgVHT);
lltf = wlanLLTF(cfgVHT);
lsig = wlanLSIG(cfgVHT);
vhtSigA = wlanVHTSIGA(cfgVHT);
vhtstf = wlanVHTSTF(cfgVHT);
vhtltf = wlanVHTLTF(cfgVHT);
vhtSigB = wlanVHTSIGB(cfgVHT);

Generate the VHT-Data field using the input data bits.

vhtData = wlanVHTData(bits,cfgVHT);

Concatenate the individual fields to create a single PPDU.

z = [lstf; lltf; lsig; vhtSigA; vhtstf; vhtltf; vhtSigB; vhtData];

Verify that the PPDUs created by the two methods are identical.

ans = logical

Related Topics