Main Content

wlanVHTDataBitRecover

Recover bits from VHT-Data field

Since R2025a

Description

[dataBits,vhtsigbCRC] = wlanVHTDataBitRecover(rxDataSym,noiseEst,csi,cfg) recovers dataBits, a column vector of bits, from rxDataSym, the equalized OFDM symbols that make up the VHT-Data field of a very high-throughput (VHT) transmission. The function recovers the bits by using the noise variance estimate noiseVarEst, the channel state information csi, and VHT transmission parameters cfg.

example

[dataBits,vhtsigbCRC] = wlanVHTDataBitRecover(___,userIdx) specifies the user index userIdx in combination with the previous syntax.

example

[dataBits,vhtsigbCRC] = wlanVHTDataBitRecover(___,Name=Value) specifies algorithm options by using one or more name-value arguments in addition to any input argument combination from the previous syntaxes. For example, LDPCDecodingMethod="layered-bp" specifies the layered belief propagation low-density parity-check (LDPC) decoding algorithm.

example

Examples

collapse all

Create a VHT configuration object with default parameters, specifying LDPC channel coding. Get the PSDU length of the configuration in bits.

cfg = wlanVHTConfig(ChannelCoding="LDPC");
psduBits = 8*cfg.PSDULength;

Generate a random sequence of PSDU bits.

txBits = randi([0 1],psduBits,1);

Use the PSDU bits to generate a time-domain waveform for the VHT-Data field of the configuration.

txData = wlanVHTData(txBits,cfg);

Generate a time-domain waveform for the very high-throughput long training field (VHT-LTF) of the configuration.

txVHTLTF = wlanVHTLTF(cfg);

Pass both time-domain waveforms through an AWGN channel with a signal-to-noise ratio of 20 dB, returning the noise variance.

snr = 20;
[rxVHTLTF,noiseEst] = awgn(txVHTLTF,snr);
rxData = awgn(txData,snr);

Demodulate the VHT-LTF and use the demodulated symbols to get a channel estimate.

demodVHTLTF = wlanVHTDemodulate(rxVHTLTF,"VHT-LTF",cfg);
chEst = wlanVHTLTFChannelEstimate(demodVHTLTF,cfg);

Demodulate the VHT-Data field and use the demodulated symbols to track and correct pilot errors.

demodData = wlanVHTDemodulate(rxData,"VHT-Data",cfg);
trackedSym = wlanVHTTrackPilotError(demodData,chEst,cfg,"VHT-Data");

Use the channel and noise estimates to equalize the pilot-error-tracked symbols. Return channel state information.

[eqSym,csi] = wlanVHTEqualize(trackedSym,chEst,noiseEst,cfg,"VHT-Data");

Get OFDM information for the configuration. Use the OFDM information to extract the data symbols and the associated channel state information.

info = wlanVHTOFDMInfo("VHT-Data",cfg);
rxDataSym = eqSym(info.DataIndices,:);
csi = csi(info.DataIndices,:);

Recover the PSDU bits by using belief propagation low-density parity-check (LDPC) decoding. Verify that the transmitted bits match the recovered bits.

[dataBits,vhtsibgCRC] = wlanVHTDataBitRecover(rxDataSym,noiseEst,csi,cfg, ...
    LDPCDecodingMethod="bp");
isequal(txBits,dataBits)
ans = logical
   1

Create a VHT configuration object with three users, three transmit antennas, and one space-time stream per user.

cfg = wlanVHTConfig(NumUsers=3,UserPositions=[0 1 2], ...
    NumTransmitAntennas=3,NumSpaceTimeStreams=[1 1 1],GroupID=1);

Create a three-element cell array of PSDU bits. Each element of the array contains the bits for one user.

psdu = cell(1,cfg.NumUsers);
for i = 1:cfg.NumUsers
    psdu{i} = randi([0 1],cfg.PSDULength(i)*8,1);
end

Generate time-domain waveforms for the VHT-LTF and VHT-Data field of the configuration.

txVHTLTF = wlanVHTLTF(cfg);
txData = wlanVHTData(psdu,cfg);

Pass both waveforms through an AWGN channel with a signal-to-noise ratio of 25 dB, returning the noise variance.

snr = 25;
[rxVHTLTF,noiseEst] = awgn(txVHTLTF,snr);
rxData = awgn(txData,snr);

Demodulate the VHT-LTF. Use the demodulated symbols to estimate the channel at the VHT-LTF.

demodVHTLTF = wlanVHTDemodulate(rxVHTLTF,"VHT-LTF",cfg);
chEst = wlanVHTLTFChannelEstimate(demodVHTLTF,cfg);

Demodulate the VHT-Data field.

field = "VHT-Data";
sym = wlanVHTDemodulate(rxData,field,cfg);

Use the demodulated symbols with the channel estimate to track and correct pilot errors.

trackedSym = wlanVHTTrackPilotError(sym,chEst,cfg,field);

Equalize the pilot-error-tracked symbols for the third user.

userIdx = 3;
[eqSym,csi] = wlanVHTEqualize(trackedSym,chEst,noiseEst,cfg,field,userIdx);

Get OFDM information for the configuration. Use the OFDM information to extract the data symbols and the associated channel state information.

info = wlanVHTOFDMInfo(field,cfg);
rxDataSym = eqSym(info.DataIndices,:);
csi = csi(info.DataIndices,:);

Recover the data bits for the third user. Verify that the transmitted bits match the recovered bits.

[dataBits,vhtsigbCRC] = wlanVHTDataBitRecover(rxDataSym,noiseEst,csi,cfg,userIdx);
isequal(psdu{userIdx},dataBits)
ans = logical
   1

Input Arguments

collapse all

Demodulated VHT-Data field, specified as a complex-valued array of size NSD-by-NSYM-by-NSS.

  • NSD is the number of data subcarriers in the VHT-Data field.

  • NSYM is the number of OFDM symbols.

  • NSS is the number of spatial streams.

The contents and size of this input depend on the VHT format specified in the cfg input.

Data Types: double | single
Complex Number Support: Yes

Noise estimate, specified as a nonnegative real scalar.

Data Types: double | single

Channel state information, specified as a real-valued array of size NSD-by-NSS.

Data Types: double | single

Physical layer (PHY) format configuration, specified as a wlanVHTConfig object.

User index, specified as a positive integer.

Note

This input is required only when the STBC property of the cfg input is 0 (false), and the NumSpaceTimeStreams of the cfg input is a vector. If you specify this input in any other situation, the function ignores it.

Name-Value Arguments

collapse all

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.

Example: MaximumLDPCIterationCount=12,EarlyTermination=false specifies a maximum of 12 LDPC decoding iterations and disables early termination so that the decoder completes the 12 iterations.

LDPC decoding algorithm, specified as the name-value argument consisting of LDPCDecodingMethod and one of these values:

  • "norm-min-sum" — Use the layered BP decoding algorithm with the normalized min-sum approximation. For more information, see Normalized Min-Sum Decoding.

  • "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.

  • "offset-min-sum" — Use the layered BP decoding algorithm with the offset min-sum approximation. For more information, see Offset Min-Sum Decoding.

Note

When you specify this input as "norm-min-sum" or "offset-min-sum", the 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.

Dependencies

This argument applies when you specify the ChannelCoding property of the cfg input as "LDPC" for the user that corresponds to the userIdx input.

Data Types: char | string

Scaling factor for normalized min-sum LDPC decoding, specified as the name-value argument consisting of MinSumScalingFactor and a scalar in the interval (0, 1].

Dependencies

This argument applies when you specify the LDPCDecodingMethod name-value argument as "norm-min-sum".

Data Types: double

Offset for min-sum LDPC decoding, specified as the name-value argument consisting of MinSumOffset and a nonnegative scalar.

Dependencies

This argument applies when you specify the LDPCDecodingMethod name-value argument as offset-min-sum.

Data Types: double

Maximum number of LDPC decoding iterations, specified as the name-value argument consisting of MaximumLDPCIterationCount and a positive integer.

Dependencies

This argument applies when you set the ChannelCoding property of the cfg input to "LDPC" for the user that corresponds to the userIdx input.

Data Types: double | single

Enable early termination of LDPC decoding, specified as the name-value argument consisting of EarlyTermination and 1 (true) or 0 (false).

  • When you set this value to 0 (false), LDPC decoding completes the number of iterations specified in the MaximumLDPCIterationCount name-value argument regardless of parity check status.

  • When you set this value to 1 (true), LDPC decoding terminates when all parity checks are satisfied.

Dependencies

This argument applies when you set the ChannelCoding property of the cfg input to "LDPC" for the user that corresponds to the userIdx input.

Output Arguments

collapse all

Bits recovered from the VHT-Data field, returned as a binary valued column vector of length 8 × LPSDU. LPSDU is equal to:

  • The PSDULength property of the cfg input when there is a single user

  • The vector entry of the PSDULength property that corresponds to the user you specify in userIdx when there are multiple users

Data Types: int8

VHT-SIG-B cyclic redundancy check (CRC) results, returned as a binary column vector of length eight.

Data Types: int8

More About

collapse all

Algorithms

collapse all

This function supports these four LDPC decoding algorithms.

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.

[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.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2025a