wlanHTDataRecover
Recover HT data
Syntax
recData = wlanHTDataRecover(rxSig,chEst,noiseVarEst,cfg)
recData = wlanHTDataRecover(rxSig,chEst,noiseVarEst,cfg,cfgRec)
[recData,eqSym] = wlanHTDataRecover(___)
[recData, eqSym,cpe] = wlanHTDataRecover(___)
Description
returns the recoveredHT-Data field[1],recData
= wlanHTDataRecover(rxSig
,chEst
,noiseVarEst
,cfg
)recData
为输入信号rxSig
. Specify a channel estimate for the occupied subcarriers,chEst
, a noise variance estimate,noiseVarEst
, and anHT-Mixedformat configuration object,cfg
.
specifies algorithm information usingrecData
= wlanHTDataRecover(rxSig
,chEst
,noiseVarEst
,cfg
,cfgRec
)wlanRecoveryConfig
objectcfgRec
.
Examples
Recover HT-Data Bits
Create an HT configuration object having a PSDU length of 1024 bytes. Generate an HTData sequence from a binary sequence whose length is eight times the length of the PSDU.
cfgHT = wlanHTConfig('PSDULength',1024); txBits = randi([0 1],8*cfgHT.PSDULength,1); txHTSig = wlanHTData(txBits,cfgHT);
Pass the signal through an AWGN channel with a signal-to-noise ratio of 10 dB.
rxHTSig = awgn(txHTSig,10);
Specify a channel estimate. Because fading was not introduced, a vector of ones is a perfect estimate. For a 20 MHz bandwidth, there are 52 data subcarriers and 4 pilot subcarriers in the HT-SIG field.
chEst = ones(56,1);
Recover the data bits and determine the number of bit errors. Display the number of bit errors and the associated bit error rate.
rxBits = wlanHTDataRecover(rxHTSig,chEst,0.1,cfgHT); [numerr,ber] = biterr(rxBits,txBits)
numerr = 0
ber = 0
Recover HT-Data Field Signal Using Zero-Forcing Algorithm
Create an HT configuration object having a 40 MHz channel bandwidth and a 1024-byte PSDU length. Generate the corresponding HT-Data sequence.
cfgHT = wlanHTConfig('ChannelBandwidth','CBW40','PSDULength',1024); txBits = randi([0 1],8*cfgHT.PSDULength,1); txHTSig = wlanHTData(txBits, cfgHT);
Pass the signal through an AWGN channel with a signal-to-noise ratio of 7 dB.
rxHTSig = awgn(txHTSig,7);
Create a data recovery object that specifies the use of the zero-forcing algorithm.
cfgRec = wlanRecoveryConfig('EqualizationMethod','ZF');
Recover the data and determine the number of bit errors. Because fading was not introduced, the channel estimate is set to a vector of ones whose length is equal to the number of occupied subcarriers.
rxBits = wlanHTDataRecover(rxHTSig,ones(114,1),0.2,cfgHT,cfgRec); [numerr,ber] = biterr(rxBits,txBits)
numerr = 0
ber = 0
Input Arguments
rxSig
—Received HT-Data signal
vector|matrix
Received HT-Data signal, specified as anNS-by-NRvector or matrix.NSis the number of samples, andNRis the number of receive antennas.
Data Types:double
Complex Number Support:Yes
chEst
—Channel estimate
vector|matrix|3-D array
Channel estimate, specified as anNST-by-NSTS-by-NRarray.NSTis the number of occupied subcarriers,NSTSis the number of space-time streams, andNRis the number of receive antennas.
Data Types:double
Complex Number Support:Yes
noiseVarEst
—Noise variance estimate
scalar
Noise variance estimate, specified as a nonnegative scalar.
Example:0.7071
Data Types:double
cfg
—Format configuration
wlanHTConfig
object
Format configuration, specified as awlanHTConfig
object. ThewlanHTDataRecover
function uses the followingwlanHTConfig
object properties:
ChannelBandwidth
— Channel bandwidth
'CBW20'
(default) |'CBW40'
Channel bandwidth in MHz, specified as'CBW20'
or'CBW40'
.
Data Types:char
|string
NumSpaceTimeStreams
— Number of space-time streams
1 (default) | 2 | 3 | 4
Number of space-time streams in the transmission, specified as 1, 2, 3, or 4.
Data Types:double
MCS
— Modulation and coding scheme
0 (default) | integer from 0 to 31
Modulation and coding scheme to use for transmitting the current packet, specified as an integer from 0 to 31. The MCS setting identifies which modulation and coding rate combination is used, and the number of spatial streams (NSS).
MCS(Note 1) | NSS(Note 1) | Modulation | Coding Rate |
---|---|---|---|
0, 8, 16, or 24 |
1, 2, 3, or 4 |
BPSK |
1/2 |
1, 9, 17, or 25 |
1, 2, 3, or 4 |
QPSK |
1/2 |
2, 10, 18, or 26 |
1, 2, 3, or 4 |
QPSK |
3/4 |
3, 11, 19, or 27 |
1, 2, 3, or 4 |
16QAM |
1/2 |
4, 12, 20, or 28 |
1, 2, 3, or 4 |
16QAM |
3/4 |
5, 13, 21, or 29 |
1, 2, 3, or 4 |
64QAM |
2/3 |
6, 14, 22, or 30 |
1, 2, 3, or 4 |
64QAM |
3/4 |
7, 15, 23, or 31 |
1, 2, 3, or 4 |
64QAM |
5/6 |
Note-1MCS from 0 to 7 have one spatial stream. MCS from 8 to 15 have two spatial streams. MCS from 16 to 23 have three spatial streams. MCS from 24 to 31 have four spatial streams. |
See IEEE®802.11™-2012, Section 20.6 for further description of MCS dependent parameters.
When working with the HT-Data field, if the number of space-time streams is equal to the number of spatial streams, no space-time block coding (STBC) is used. See IEEE 802.11-2012, Section 20.3.11.9.2 for further description of STBC mapping.
Example:22
indicates an MCS with three spatial streams, 64-QAM modulation, and a 3/4 coding rate.
Data Types:double
GuardInterval
— Cyclic prefix length for the data field within a packet
'Long'
(default) |'Short'
Cyclic prefix length for the data field within a packet, specified as'Long'
or'Short'
.
The long guard interval length is 800 ns.
The short guard interval length is 400 ns.
Data Types:char
|string
ChannelCoding
— Type of forward error correction coding
'BCC'
(default) |'LDPC'
Type of forward error correction coding for the data field, specified as'BCC'
(default) or'LDPC'
.'BCC'
indicates binary convolutional coding and'LDPC'
indicates low density parity check coding. Providing a character vector or a single cell character vector defines the channel coding type for a single user or all users in a multiuser transmission. By providing a cell array different channel coding types can be specified per user for a multiuser transmission.
Data Types:char
|cell
|string
PSDULength
— Number of bytes carried in the user payload
1024 (default) | integer from 0 to 65,535
Number of bytes carried in the user payload, specified as an integer from 0 to 65,535. APSDULength
of 0 implies a sounding packet for which there are no data bits to recover.
Example:512
Data Types:double
cfgRec
—Algorithm parameters
wlanRecoveryConfig
object
Algorithm parameters, specified as awlanRecoveryConfig
object. The object properties include:
OFDMSymbolOffset
— OFDM symbol sampling offset
0.75 (default) | scalar value from 0 to 1
OFDM symbol sampling offset represented as a fraction of the cyclic prefix (CP) length, specified as a scalar value from 0 to 1. This value indicates the start location for OFDM demodulation, relative to the beginning of the cyclic prefix.OFDMSymbolOffset
= 0 represents the start of the cyclic prefix andOFDMSymbolOffset
= 1 represents the end of the cyclic prefix.
Data Types:double
EqualizationMethod
— Equalization method
'MMSE'
(default) |'ZF'
Equalization method, specified as'MMSE'
or'ZF'
.
'MMSE'
indicates that the receiver uses a minimum mean square error equalizer.'ZF'
indicates that the receiver uses a zero-forcing equalizer.
Example:'ZF'
Data Types:char
|string
PilotPhaseTracking
— Pilot phase tracking
'PreEQ'
(default) |'None'
Pilot phase tracking, specified as'PreEQ'
or'None'
.
'PreEQ'
— Enables pilot phase tracking, which is performed before any equalization operation.'None'
— Pilot phase tracking does not occur.
Data Types:char
|string
MaximumLDPCIterationCount
— Maximum number of decoding iterations in LDPC
12 (default) | positive scalar integer
Maximum number of decoding iterations in LDPC, specified as a positive scalar integer. This parameter is applicable when channel coding is set to LDPC. For information on channel coding options, seewlanVHTConfig
orwlanHTConfig
for 802.11 format of interest.
Data Types:double
EarlyTermination
— Enable early termination of LDPC decoding
false
(default) |true
Enable early termination of LDPC decoding, specified as a logical. This parameter is applicable when channel coding is set to LDPC.
When set to
false
, LDPC decoding completes the number of iterations specified byMaximumLDPCIterationCount
,不管parity check status.When set to
true
, LDPC译码时终止parity-checks are satisfied.
For information on channel coding options, seewlanVHTConfig
orwlanHTConfig
for 802.11 format of interest.
Output Arguments
recData
— Recovered binary output data
binary column vector
Recovered binary output data, returned as a column vector of length 8×NPSDU, whereNPSDUis the length of the PSDU in bytes. SeewlanHTConfig PropertiesforPSDULength
details.
Data Types:int8
eqSym
— Equalized symbols
列向量| matrix | 3-D array
Equalized symbols, returned as anNSD-by-NSYM-by-NSSarray.NSDis the number of data subcarriers,NSYMis the number of OFDM symbols in the HT-Data field, andNSSis the number of spatial streams.
Data Types:double
Complex Number Support:Yes
cpe
— Common phase error
列向量
Common phase error in radians, returned as a column vector having lengthNSYM.NSYMis the number of OFDM symbols in the HT-Data field.
More About
HT-Data field
The high throughput data field (HT-Data) follows the last HT-LTF of an HT-mixed packet.
The high throughput data field is used to transmit one or more frames from the MAC layer and consists of four subfields.
Service field— Contains 16 zeros to initialize the data scrambler.
PSDU— Variable-length field containing the PLCP service data unit (PSDU). In 802.11, the PSDU can consist of an aggregate of several MAC service data units.
Tail— Tail bits required to terminate a convolutional code. The field uses six zeros for each encoding stream.
Pad Bits— Variable-length field required to ensure that the HT-Data field consists of an integer number of symbols.
HT-Mixed
High throughput mixed (HT-mixed) format devices support a mixed mode in which the PLCP header is compatible with HT and Non-HT modes.
References
[1] IEEE Std 802.11™-2012 IEEE Standard for Information technology — Telecommunications and information exchange between systems — Local and metropolitan area networks — Specific requirements — Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Use in aMATLAB Functionblock is not supported.
See Also
Introduced in R2015b
[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
- 联合王国(English)