Recover HT data
returns
the recovered HT-Data field[1]
, recData
= wlanHTDataRecover(rxSig
,chEst
,noiseVarEst
,cfg
)recData
,
for input signal rxSig
. Specify a channel estimate
for the occupied subcarriers, chEst
, a noise
variance estimate, noiseVarEst
, and an HT-Mixed format configuration object, cfg
.
specifies algorithm options by using one or more name-value pair arguments. When you
do not specify a name-value pair, the function uses the default value.recData
= wlanHTDataRecover(rxSig
,chEst
,noiseVarEst
,cfg
,Name,Value
)
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
Create an HT configuration object with a 40 MHz channel bandwidth and a PSDU length of 1024 bytes. Generate the corresponding HT-Data sequence.
cfg = wlanHTConfig('ChannelBandwidth','CBW40','PSDULength',1024); txBits = randi([0 1],8*cfg.PSDULength,1); txSig = wlanHTData(txBits,cfg);
Pass the signal through an additive white Gaussian noise (AWGN) channel with a signal-to-noise ratio of 7 dB.
rxSig = awgn(txSig,7);
Recover the data and determine the number of bit errors, specifying a zero-forcing algorithm. Because there is no fading, set the channel estimate to a vector of ones whose length is equal to the number of occupied subcarriers.
chEst = ones(114,1); noiseVarEst = 0.2; recData = wlanHTDataRecover(rxSig,chEst,noiseVarEst,cfg,'EqualizationMethod','ZF'); [numerr,ber] = biterr(recData,txBits);
rxSig
— Received HT-Data signalReceived HT-Data signal, specified as an NS-by-NR vector or matrix. NS is the number of samples, and NR is the number of receive antennas.
Data Types: double
Complex Number Support: Yes
chEst
— Channel estimateChannel estimate, specified as an NST-by-NSTS-by-NR array. NST is the number of occupied subcarriers, NSTS is the number of space-time streams, and NR is the number of receive antennas.
Data Types: double
Complex Number Support: Yes
noiseVarEst
— Noise variance estimateNoise variance estimate, specified as a nonnegative scalar.
Example: 0.7071
Data Types: double
cfg
— Format configurationwlanHTConfig
objectFormat configuration, specified as a wlanHTConfig
object.
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
.
'PilotPhaseTracking','None'
disables pilot phase
tracking.'OFDMSymbolOffset'
— OFDM symbol sampling offset0.75
(default) | scalar in the interval [0, 1]OFDM symbol sampling offset represented as a fraction of the cyclic prefix (CP)
length, specified as a scalar in the interval [0, 1]. The value you specify indicates
the start location for OFDM demodulation relative to the beginning of the cyclic prefix.
The value 0
represents the start of the cyclic prefix and the value
1
represents the end of the cyclic prefix.
Data Types: double
'EqualizationMethod'
— Equalization method'MMSE'
(default) | 'ZF'
Equalization method, specified as one of these values:
'MMSE'
— The receiver uses a
minimum mean squared error equalizer.
'ZF'
— The receiver uses a
zero-forcing equalizer.
Data Types: char
| string
'PilotPhaseTracking'
— Pilot phase tracking'PreEQ'
(default) | 'None'
Pilot phase tracking, specified as one of these values:
'PreEQ'
— Enable pilot phase
tracking, which is performed before any equalization
operation.
'None'
— Disable pilot phase
tracking.
Data Types: char
| string
'LDPCDecodingMethod'
— LDPC decoding algorithm'bp'
(default) | 'layered-bp'
| 'norm-min-sum'
| 'offset-min-sum'
LDPC decoding algorithm, specified as one of these values.
'bp'
— Use the belief
propagation (BP) decoding algorithm. For more information,
see Belief Propagation Decoding.
'layered-bp'
— Use the layered
BP decoding algorithm, suitable for quasi-cyclic parity
check matrices (PCMs). For more information, see Layered Belief Propagation Decoding.
'norm-min-sum'
— Use the layered
BP decoding algorithm with the normalized min-sum
approximation. for more information, see Normalized Min-Sum Decoding.
'offset-min-sum'
— Use the
layered BP decoding algorithm with the offset min-sum
approximation. For more information, see Offset Min-Sum Decoding.
When you specify this input as 'norm-min-sum'
or 'offset-min-sum'
, the
wlanHTDataRecover
function sets input
log-likelihood ratio (LLR) values that are greater than
1e10
or less than -1e10
to
1e10
and -1e10
,
respectively. The function then uses these values when executing the
LDPC decoding algorithm.
To enable this argument, specify the
ChannelCoding
property of the
cfg
input as
'LDPC'
.
Data Types: char
| string
'MinSumScalingFactor'
— Scaling factor for normalized min-sum LDPC decoding0.75
(default) | scalar in the interval (0, 1]Scaling factor for normalized min-sum LDPC decoding, specified as a scalar in the interval (0, 1].
To enable this argument, specify the
'
LDPCDecodingMethod
'
name-value pair argument as 'norm-min-sum'
.
Data Types: double
'MinSumOffset'
— Offset for offset min-sum LDPC decoding0.5
(default) | nonnegative scalarOffset for offset min-sum LDPC decoding, specified as a nonnegative scalar.
To enable this argument, specify the
'
LDPCDecodingMethod
'
name-value pair argument as 'offset-min-sum'
.
Data Types: double
'MaximumLDPCIterationCount'
— Maximum number of LDPC decoding iterations12
(default) | positive integerMaximum number of LDPC decoding iterations, specified as a positive integer.
To enable this argument, set the
ChannelCoding
property of the
cfg
input to
'LDPC'
.
Data Types: double
'EarlyTermination'
— Enable early termination of LDPC decodingfalse
or
0
(default) | true
or 1
Enable early termination of LDPC decoding, specified as
1
(true
) or
0
(false
).
When you set this value to 0
(false
), LDPC decoding completes the
number of iterations specified by
'MaximumLDPCIterationCount'
regardless of parity check status.
When you set this value to 1
(true
), LDPC decoding terminates when
all parity checks are satisfied.
To enable this argument, specify the
ChannelCoding
property of the
cfg
input as
'LDPC'
.
Data Types: logical
recData
— Recovered binary output dataRecovered binary output data, returned as a column vector of length
8×NPSDU, where
NPSDU is the length of the
PSDU in bytes. See wlanHTConfig
for
PSDULength
details.
Data Types: int8
eqSym
— Equalized symbolsEqualized symbols, returned as an NSD-by-NSYM-by-NSS array. NSD is the number of data subcarriers, NSYM is the number of OFDM symbols in the HT-Data field, and NSS is the number of spatial streams.
Data Types: double
Complex Number Support: Yes
cpe
— Common phase errorCommon phase error in radians, returned as a column vector having length NSYM. NSYM is the number of OFDM symbols in the 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.
High throughput mixed (HT-mixed) format devices support a mixed mode in which the PLCP header is compatible with HT and Non-HT modes.
The wlanHTDataRecover
function supports these four LDPC decoding
algorithms.
The wlanHTDataRecover
function implements the BP algorithm based on
the decoding algorithm presented in [2]. For transmitted
LDPC-encoded codeword , the input to the LDPC decoder is the LLR given by
.
In each iteration, the function updates the key components of the algorithm based on these equations:
,
, initialized as before the first iteration, and
.
At the end of each iteration, is an updated estimate of the LLR value for the transmitted bit, . The value is the soft-decision output for . If is negative, the hard-decision output for is 1. Otherwise, the output is 0.
Index sets and are based on the PCM such that the sets and correspond to all nonzero elements in column i and row j of the PCM, respectively.
This figure demonstrates how to compute these index sets for PCM for the case i = 5 and j = 3.
To avoid infinite numbers in the algorithm equations, atanh(1) and atanh(–1) are set to 19.07 and –19.07, respectively. Due to finite precision, MATLAB® returns 1 for tanh(19.07) and –1 for tanh(–19.07).
When you specify the
'
EarlyTermination
'
name-value pair argument as 0
(false
), the
decoding terminates after the number of iterations specified by the
'
MaximumLDPCIterationCount
'
name-value pair argument. When you specify the
'
EarlyTermination
'
name-value pair argument as 1
(true
), the
decoding terminates when all parity checks are satisfied () or after the number of iterations specified by the
'
MaximumLDPCIterationCount
'
name-value pair argument.
The wlanHTDataRecover
function implements the layered BP algorithm
based on the decoding algorithm presented in Section II.A of [3]. The decoding
loop iterates over subsets of rows (layers) of the PCM.
For each row, m, in a layer and each bit index, j, the implementation updates the key components of the algorithm based on these equations.
(1)
(2)
(3)
(4)
(5)
(6)
For each layer, the decoding equation (6) works on the combined input obtained from the current LLR inputs, , and the previous layer updates, .
Because the layered BP algorithm updates only a subset of the nodes in a layer, this algorithm is faster than the BP algorithm. To achieve the same error rate as attained with BP decoding, use half the number of decoding iterations when using the layered BP algorithm.
The wlanHTDataRecover
function implements the normalized min-sum
decoding algorithm by following the layered BP algorithm with equation (3) replaced
by
,
where α is the scaling factor specified by the
'
MinSumScalingFactor
'
name-value pair argument. This equation is an adaptation of equation (4) presented
in [4].
The wlanHTDataRecover
function implements the offset min-sum
decoding algorithm by following the layered BP algorithm with equation (3) replaced
by
,
where β is the offset specified by the
'
MinSumOffset
'
name-value pair argument. This equation is an adaptation of equation (5) presented
in [4].
[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.
[2] Gallager, Robert G. Low-Density Parity-Check Codes. Cambridge, MA: MIT Press, 1963.
[3] Hocevar, D.E. "A Reduced Complexity Decoder Architecture via Layered Decoding of LDPC Codes." In IEEE Workshop on Signal Processing Systems, 2004. SIPS 2004., 107-12. Austin, Texas, USA: IEEE, 2004. https://doi.org/10.1109/SIPS.2004.1363033.
[4] Jinghu Chen, R.M. Tanner, C. Jones, and Yan Li. "Improved Min-Sum Decoding Algorithms for Irregular LDPC Codes." In Proceedings. International Symposium on Information Theory, 2005. ISIT 2005., 449-53, 2005. https://doi.org/10.1109/ISIT.2005.1523374.
[1] IEEE® Std 802.11-2012 Adapted and reprinted with permission from IEEE. Copyright IEEE 2012. All rights reserved.
You have a modified version of this example. Do you want to open this example with your edits?