Main Content


Recover non-HT Data



recData = wlanNonHTDataRecover(rxSig,chEst,noiseVarEst,cfg) recovers Non-HT Data field[1] bits from received time-domain waveform rxSig, channel estimate data chEst, noise variance estimate noiseVarEst, and non-high-throughput (non-HT) transmission parameters cfg.


This function only supports data recovery for OFDM modulation.


recData = wlanNonHTDataRecover(rxSig,chEst,noiseVarEst,cfg,Name,Value) specifies recovery algorithm parameters by using one or more name-value pair arguments in addition to the inputs from the previous syntax.

[recData,eqSym] = wlanNonHTDataRecover(___) returns the recovered equalized symbols.

[recData,eqSym,cpe,scramInit] = wlanNonHTDataRecover(___) returns recovered common phase error cpe and initial scrambler state scramInit.


collapse all

Create a non-HT configuration object having a PSDU length of 2048 bytes. Generate the corresponding data sequence.

cfg = wlanNonHTConfig('PSDULength',2048);
txBits = randi([0 1],8*cfg.PSDULength,1);
txSig = wlanNonHTData(txBits,cfg);

Pass the signal through an AWGN channel with a signal-to-noise ratio of 15 dB.

rxSig = awgn(txSig,15);

Recover the data and determine the number of bit errors.

rxBits = wlanNonHTDataRecover(rxSig,ones(52,1),0.05,cfg);
[numerr,ber] = biterr(rxBits,txBits)
numerr = 0
ber = 0

Create a non-HT configuration object, specifying a PSDU length of 1024 bytes. Generate the corresponding non-HT data sequence.

cfg = wlanNonHTConfig('PSDULength',1024);
txBits = randi([0 1],8*cfg.PSDULength,1);
txSig = wlanNonHTData(txBits,cfg);

Pass the signal through an AWGN channel with a signal-to-noise ratio of 10 dB.

rxSig = awgn(txSig,10);

Recover the data by using a zero-forcing algorithm and determine the number of bit errors.

chanEst = ones(52,1);
noiseVarEst = 0.1;
rxBits = wlanNonHTDataRecover(rxSig,chanEst,noiseVarEst,cfg,'EqualizationMethod','ZF');
[numerr,ber] = biterr(rxBits,txBits)
numerr = 0
ber = 0

Configure a non-HT data object.

cfg = wlanNonHTConfig;

Generate and transmit a non-HT PSDU.

txPSDU = randi([0 1],8*cfg.PSDULength,1);
txSig = wlanNonHTData(txPSDU,cfg);

Generate an L-LTF for channel estimation.

txLLTF = wlanLLTF(cfg);

Create an 802.11g channel with a 3 Hz maximum Doppler shift and a 100 ns RMS path delay. Disable the reset before filtering option so that the L-LTF and data fields use the same channel realization.

ch802 = comm.RayleighChannel('SampleRate',20e6,'MaximumDopplerShift',3,'PathDelays',100e-9);

Pass the L-LTF and data signals through an 802.11g channel with AWGN.

rxLLTF = awgn(ch802(txLLTF),10);
rxSig = awgn(ch802(txSig),10);

Demodulate the L-LTF and use it to estimate the fading channel.

dLLTF = wlanLLTFDemodulate(rxLLTF,cfg);
chEst = wlanLLTFChannelEstimate(dLLTF,cfg);

Recover the non-HT data using the L-LTF channel estimate and determine the number of bit errors in the transmitted packet.

rxPSDU = wlanNonHTDataRecover(rxSig,chEst,0.1,cfg);

[numErr,ber] = biterr(txPSDU,rxPSDU)
numErr = 0
ber = 0

Input Arguments

collapse all

Received non-HT Data field time-domain waveform, specified as a complex-valued matrix of size NS-by-NR.

  • NS is the number of time-domain samples in the non-HT Data field. If you specify this input as a matrix with more than NS rows, the function does not use the redundant samples after the first NS.

  • NR is the number of receive antennas.

Data Types: double
Complex Number Support: Yes

Channel estimate data, specified as a complex-valued array of size NST-by-1-by-NR.

  • NST is the number of occupied subcarriers.

  • NR is the number of receive antennas.

The singleton dimension corresponds to the single transmitted stream in the legacy long training field (L-LTF), which includes the combined cyclic shifts if the transmitter uses multiple antennas.

Data Types: double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Example: 0.7071

Data Types: double

Non-HT transmission parameters, specified as a wlanNonHTConfig object.

Name-Value Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'PilotPhaseTracking','None' disables pilot phase tracking.

OFDM symbol sampling offset represented as a fraction of the cyclic prefix (CP) length, specified as the comma-separated pair consisting of 'OFDMSymbolOffset' and a scalar in the interval [0, 1]. The value you specify indicates the start location for OFDM demodulation relative to the beginning of the CP. The value 0 represents the start of the CP, and the value 1 represents the end of the CP.

Data Types: double

Equalization method, specified as one of these values.

  • 'MMSE' — The receiver uses a minimum mean-square error equalizer.

  • 'ZF' — The receiver uses a zero-forcing equalizer.

When the received signal has multiple receive antennas, the function exploits receiver diversity during equalization. When the number of transmitted space-time streams is one and you specify this argument as 'ZF', the function performs maximal-ratio combining.

Data Types: char | string

Pilot phase tracking, specified as the comma-separated pair consisting of 'PilotPhaseTracking' and one of these values.

  • 'PreEQ' — Enable pilot phase tracking, which the function performs before any equalization operation.

  • 'None' — Disable pilot phase tracking.

Data Types: char | string

Output Arguments

collapse all

Recovered physical layer convergence procedure (PLCP) service data unit (PSDU) bits, returned as a binary-valued column vector of length 8 × L, where L is the value of the PSDULength property of the cfg input.

Data Types: int8

Equalized symbols, returned as a complex-valued matrix of size NSD-by-NSym.

  • NSD is the number of data subcarriers.

  • NSym is the number of OFDM symbols in the non-HT Data field.

Data Types: double
Complex Number Support: Yes

Common phase error, in radians, returned as a real-valued column vector of length NSym, the number of OFDM symbols in the non-HT Data field.

Data Types: double

Recovered initial scrambler state, returned as an integer in the interval [0, 127]. For more information, see section of [1].

Data Types: int8

More About

collapse all

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.


[1] IEEE Std 802.11™-2016 (Revision of IEEE Std 802.11-2012). “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™.

Introduced in R2015b

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