Main Content

wlanNonHTDataRecover

Recover non-HT Data

Description

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

Note

This function only supports data recovery for OFDM modulation.

example

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.

example

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

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

[recData,eqSym,cpe,scramInit,ae] = wlanNonHTDataRecover(___) returns ae, the average amplitude error with respect to the estimated received pilots.

example

Examples

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

Investigate how applying an amplitude droop affects the amplitude error of the non-HT Data field generated from a non-HT signal.

Configure a non-HT transmission with default parameters, then generate the corresponding non-HT Data field.

cfgNonHT = wlanNonHTConfig;
psduLength = 8*cfgNonHT.PSDULength;
bits = randi([0 1],psduLength,1); 
tx = wlanNonHTData(bits,cfgNonHT);

Modify the signal by applying an amplitude droop of 10 dB, starting at the halfway point.

signalLength = size(tx,1);
droopGain = 10;
droopGainLinear = 10^(droopGain/20);
txDroop = [ones(signalLength/2,1);droopGainLinear*ones(signalLength/2,1)].*tx;

Specify a channel estimate.

chEst = ones(52,1);

Recover the bits from the ideal and impaired non-HT Data fields and confirm that the recovered bits match the transmitted bits.

[databits_1,eqSym_1,cpe_1,scram_1,ae_1] = wlanNonHTDataRecover(tx,chEst,0,cfgNonHT,EqualizationMethod="ZF",PilotAmplitudeTracking = 'PreEQ');
[databits_2,eqSym_2,cpe_2,scram_2,ae_2] = wlanNonHTDataRecover(txDroop,chEst,0,cfgNonHT,EqualizationMethod="ZF",PilotAmplitudeTracking = 'PreEQ');
isequal(databits_1,databits_2,bits)
ans = logical
   1

Plot the absolute value of the measured amplitude errors for the ideal and impaired non-HT Data fields.

plot(abs(ae_1))
title('Average Amplitude Error vs. OFDM Symbol Index')
ylabel('Average Amplitude Error (dB)')
xlabel('OFDM Symbol Index')
ylim([-50 50])
hold on
plot(abs(ae_2))
legend('Unmodified signal','Droop applied')

Figure contains an axes object. The axes object with title Average Amplitude Error vs. OFDM Symbol Index, xlabel OFDM Symbol Index, ylabel Average Amplitude Error (dB) contains 2 objects of type line. These objects represent Unmodified signal, Droop applied.

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: single | 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: single | double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Example: 0.7071

Data Types: single | double

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

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

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

OFDM symbol sampling offset represented as a fraction of the cyclic prefix (CP) length, specified as the name-value 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.

Different values of the OFDMSymbolOffset argument

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 name-value 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

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

  • 'None' — Disable pilot amplitude tracking.

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

Note

Due to the limitations of the algorithm used, disable pilot amplitude tracking when filtering a waveform through a MIMO fading channel.

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: single | 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. This output is averaged over the receive antennas.

Data Types: single | double

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

Data Types: int8

Average amplitude error, in dB, returned as a real-valued array of size NSym-by- NR.

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

  • NR is the number of receive antennas.

Each element of this matrix contains the amplitude error for all subcarriers with respect to the estimated received pilots for the corresponding OFDM symbol and receive antenna.

Data Types: single | double

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.

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

expand all


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