wlanNonHTDataRecover
Recover non-HT Data
Syntax
Description
recovers Non-HT Data field1
bits from received time-domain waveform recData
= wlanNonHTDataRecover(rxSig
,chEst
,noiseVarEst
,cfg
)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.
specifies recovery algorithm parameters by using one or more name-value pair
arguments in addition to the inputs from the previous syntax.recData
= wlanNonHTDataRecover(rxSig
,chEst
,noiseVarEst
,cfg
,Name,Value
)
Examples
Recover Non-HT Data Bits
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
Recover Non-HT Data Bits Using Zero-Forcing Algorithm
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
Recover Non-HT Data in Fading Channel
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
Recover Non-HT Data Field and Calculate Amplitude Error
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')
Input Arguments
rxSig
— Received non-HT Data field time-domain waveform
complex-valued matrix
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
chEst
— Channel estimate data
complex-valued array
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
noiseVarEst
— Noise variance estimate
nonnegative scalar
Noise variance estimate, specified as a nonnegative scalar.
Example: 0.7071
Data Types: single
| double
cfg
— Non-HT transmission parameters
wlanNonHTConfig
object
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.
OFDMSymbolOffset
— OFDM symbol sampling offset
0.75
(default) | scalar in the interval [0, 1]
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.
Data Types: double
EqualizationMethod
— Equalization method
'MMSE'
(default) | 'ZF'
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
PilotPhaseTracking
— Pilot phase tracking
'PreEQ'
(default) | 'None'
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
PilotAmplitudeTracking
— Pilot amplitude tracking
'None'
(default) | 'PreEQ'
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
eqSym
— Equalized symbols
complex-valued matrix
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
cpe
— Common phase error
real-valued column vector
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
scramInit
— Recovered initial scrambler state
integer in the interval [0, 127]
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
ae
— Average amplitude error
real-valued array
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
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 R2015bR2023b: Single precision support
This function supports single-precision values for its numeric input arguments.
R2022b: Pilot amplitude tracking
You can perform pilot amplitude tracking by setting the
PilotAmplitudeTracking
input argument to
'PreEQ'
. The average amplitude error is returned in the
output argument ae
.
See Also
1 IEEE® Std 802.11-2012 Adapted and reprinted with permission from IEEE. Copyright IEEE 2012. All rights reserved.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)