wlanVHTDataRecover

Recover VHT data

Description

example

recBits = wlanVHTDataRecover(rxSig,chEst,noiseVarEst,cfg) returns the recovered payload bits from the VHT data field[1] for a single-user transmission. Inputs include the received VHT data field signal, the channel estimate, the noise variance estimate, and the format configuration object, cfg.

example

recBits = wlanVHTDataRecover(rxSig,chEst,noiseVarEst,cfg,userNumber) returns the recovered payload bits, in a multiuser transmission, for the user specified by userNumber.

recBits = wlanVHTDataRecover(rxSig,chEst,noiseVarEst,cfg,userNumber,numSTS) also specifies the number of space-time streams, numSTS, for a multiuser transmission.

example

recBits = wlanVHTDataRecover(___,cfgRec) returns the recovered bits using the algorithm parameters specified in cfgRec.

[recBits,crcBits] = wlanVHTDataRecover(___) also returns the VHT-SIG-B checksum bits, crcBits, using the arguments from the previous syntaxes.

[recBits,crcBits,eqSym] = wlanVHTDataRecover(___) also returns the equalized symbols, eqSym.

[recBits,crcBits,eqSym,cpe] = wlanVHTDataRecover(___) also returns the common phase error, cpe.

Examples

collapse all

Recover bits in the VHT-Data field using channel estimation on a VHT-LTF field over a 2 x 2 quasi-static fading channel.

Create a VHT configuration object with 160 MHz channel bandwidth and two transmission paths.

cbw = 'CBW160';
vht = wlanVHTConfig('ChannelBandwidth',cbw,'NumTransmitAntennas',2,'NumSpaceTimeStreams',2,'APEPLength',512);

Generate VHT-LTF and VHT-Data field signals.

txDataBits = randi([0 1],8*vht.PSDULength,1);
txVHTLTF  = wlanVHTLTF(vht); 
txVHTData = wlanVHTData(txDataBits,vht);

Pass the transmitted waveform through a 2 x 2 quasi-static fading channel with AWGN.

snr = 10;
H = 1/sqrt(2)*complex(randn(2,2),randn(2,2));
rxVHTLTF  = awgn(txVHTLTF*H,snr);
rxVHTData = awgn(txVHTData*H,snr);

Calculate the received signal power and use it to estimate the noise variance.

powerDB = 10*log10(var(rxVHTData));
noiseVarEst = mean(10.^(0.1*(powerDB-snr)));

Perform channel estimation based on the VHT-LTF field.

demodVHTLTF = wlanVHTLTFDemodulate(rxVHTLTF,vht,1);
chanEst = wlanVHTLTFChannelEstimate(demodVHTLTF,vht);

Recover payload bits in the VHT-Data field and compare against the original payload bits.

rxDataBits = wlanVHTDataRecover(rxVHTData,chanEst,noiseVarEst,vht);
numErr = biterr(txDataBits,rxDataBits)
numErr = 0

Recover a VHT-Data field signal through a SISO AWGN channel using ZF equalization.

Configure VHT format object, generate random payload bits, and generate the VHT-Data field.

cfgVHT = wlanVHTConfig('APEPLength',512); 
txBits = randi([0 1], 8*cfgVHT.PSDULength,1); 
txVHTData = wlanVHTData(txBits,cfgVHT);

Pass the transmitted VHT data through an AWGN channel.

awgnChan = comm.AWGNChannel('NoiseMethod','Variance','Variance',0.1);
rxVHTData = awgnChan(txVHTData);

Configure the recovery object and recover the payload bits using a perfect channel estimate of all ones. Compare the recovered bits against the transmitted bits.

cfgRec = wlanRecoveryConfig('EqualizationMethod','ZF');
recBits = wlanVHTDataRecover(rxVHTData,ones(242,1),0.1,cfgVHT,cfgRec);
numErrs = biterr(txBits,recBits)
numErrs = 0

Recover VHT-Data field bits for a multiuser transmission using channel estimation on a VHT-LTF field over a quasi-static fading channel.

Create a VHT configuration object having a 160 MHz channel bandwidth, two users, and four transmit antennas. Assign one space-time stream to the first user and three space-time streams to the second user.

cbw = 'CBW160';
numSTS = [1 3];
vht = wlanVHTConfig('ChannelBandwidth',cbw,'NumUsers',2, ...
    'NumTransmitAntennas',4,'NumSpaceTimeStreams',numSTS);

Because there are two users, the PSDU length is a 1-by-2 row vector.

psduLen = vht.PSDULength
psduLen = 1×2

        1050        3156

Generate multiuser input data. This data must be in the form of a 1-by- N cell array, where N is the number of users.

txDataBits{1} = randi([0 1],8*vht.PSDULength(1),1);
txDataBits{2} = randi([0 1],8*vht.PSDULength(2),1);

Generate VHT-LTF and VHT-Data field signals.

txVHTLTF  = wlanVHTLTF(vht); 
txVHTData = wlanVHTData(txDataBits,vht);

Pass the data field for the first user through a 4x1 channel because it consists of a single space-time stream. Pass the second user's data through a 4x3 channel because it consists of three space-time streams. Apply white Gaussian noise to each user signal.

snr = 15;
H1 = 1/sqrt(2)*complex(randn(4,1),randn(4,1));
H2 = 1/sqrt(2)*complex(randn(4,3),randn(4,3));

rxVHTData1 = awgn(txVHTData*H1,snr,'measured');
rxVHTData2 = awgn(txVHTData*H2,snr,'measured');

Repeat the process for the VHT-LTF fields.

rxVHTLTF1  = awgn(txVHTLTF*H1,snr,'measured');
rxVHTLTF2  = awgn(txVHTLTF*H2,snr,'measured');

Calculate the received signal power for both users and use it to estimate the noise variance.

powerDB1 = 10*log10(var(rxVHTData1));
noiseVarEst1 = mean(10.^(0.1*(powerDB1-snr)));

powerDB2 = 10*log10(var(rxVHTData2));
noiseVarEst2 = mean(10.^(0.1*(powerDB2-snr)));

Estimate the channel characteristics using the VHT-LTF fields.

demodVHTLTF1 = wlanVHTLTFDemodulate(rxVHTLTF1,cbw,numSTS);
chanEst1 = wlanVHTLTFChannelEstimate(demodVHTLTF1,cbw,numSTS);

demodVHTLTF2 = wlanVHTLTFDemodulate(rxVHTLTF2,cbw,numSTS);
chanEst2 = wlanVHTLTFChannelEstimate(demodVHTLTF2,cbw,numSTS);

Recover VHT-Data field bits for the first user and compare against the original payload bits.

rxDataBits1 = wlanVHTDataRecover(rxVHTData1,chanEst1,noiseVarEst1,vht,1);
[~,ber1] = biterr(txDataBits{1},rxDataBits1)
ber1 = 0.4983

Determine the number of bit errors for the second user.

rxDataBits2 = wlanVHTDataRecover(rxVHTData2,chanEst2,noiseVarEst2,vht,2);
[~,ber2] = biterr(txDataBits{2},rxDataBits2)
ber2 = 0.0972

The bit error rates are quite high because there is no precoding to mitigate the interference between streams. This is especially evident for the user 1 receiver because it receives energy from the three streams intended for user 2. The example is intended to show the workflow and proper syntaxes for the LTF demodulate, channel estimation, and data recovery functions.

Input Arguments

collapse all

Received VHT-Data field signal in the time domain, specified as an NS-by-NR matrix. NR is the number of receive antennas. NS must be greater than or equal to the number of time-domain samples in the VHT-Data field input.

Note

wlanVHTDataRecover processes one PPDU data field per entry. If NS is greater than the field length, extra samples at the end of rxSig are not processed. To process a concatenated stream of PPDU data fields, multiple calls to wlanVHTDataRecover are required. If rxSig is shorter than the length of the VHT-Data field, an error occurs.

Data Types: double
Complex Number Support: Yes

Channel estimation for data and pilot subcarriers, specified as a matrix or array of size NST-by-NSTS-by-NR. NST is the number of occupied subcarriers. NSTS is the number of space-time streams. For multiuser transmissions, NSTS is the total number of space-time streams for all users. NR is the number of receive antennas. NST and NSTS must match the cfg configuration object settings for channel bandwidth and number of space-time streams.

NST increases with channel bandwidth.

ChannelBandwidthNumber of Occupied Subcarriers (NST)Number of Data Subcarriers (NSD)Number of Pilot Subcarriers (NSP)
'CBW20'56524
'CBW40'1141086
'CBW80'2422348
'CBW160'48446816

Data Types: double
Complex Number Support: Yes

Noise variance estimate, specified as a nonnegative scalar.

Data Types: double

VHT PPDU configuration, specified as a wlanVHTConfig object.

Algorithm parameters containing properties used during data recovery, specified as a wlanRecoveryConfig object. The configurable properties include OFDM symbol sampling offset, equalization method, and the type of pilot phase tracking. If you do not specify a cfgRec object, the default object property values as described in wlanVHTConfig are used in the data recovery.

Note

Use cfgRec.EqualizationMethod = 'ZF' when either of the following conditions are met:

  • cfg.NumSpaceTimeStreams=1

  • cfg.NumSpaceTimeStreams=2 and cfg.STBC=true

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

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

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

Maximum number of decoding iterations in low-density parity check (LDPC), specified as a positive integer. This argument applies when channel coding is set to LDPC for the user of interest.

For information on channel coding options, see the 802.11™ format configuration object of interest.

Data Types: double

Enable early termination of LDPC decoding, specified as a logical value of 1 (true) or 0 (false). This property applies when channel coding is set to LDPC for the user of interest.

  • When set to false, LDPC decoding completes the number of iterations specified by MaximumLDPCIterationCount, regardless of parity check status.

  • When set to true, LDPC decoding terminates when all parity-checks are satisfied.

For information on channel coding options, see the 802.11 format configuration object of interest.

Data Types: logical

Number of the user in a multiuser transmission, specified as an integer having a value from 1 to NUsers. NUsers is the total number of users.

Number of space-time streams in a multiuser transmission, specified as a vector. The number of space-time streams is a 1-by-NUsers vector of integers from 1 to 4, where NUsers is an integer from 1 to 4.

Example: [1 3 2] is the number of space-time streams for each user.

Note

The sum of the space-time stream vector elements must not exceed eight.

Data Types: double

Output Arguments

collapse all

Recovered payload bits in the VHT-Data field, returned as a column vector of length 8 × cfgVHT.PSDULength. See wlanVHTConfig for PSDULength details. The output is for a single user as determined by userNumber.

Data Types: int8

Checksum bits for VHT-SIG-B field, returned as a binary column vector of length 8.

Data Types: int8

Equalized symbols, returned as an NSD-by-NSYM-by-NSS matrix or array. NSD is the number of data subcarriers. NSYM is the number of OFDM symbols in the VHT-Data field. NSS is the number of spatial streams assigned to the user. When STBC is false, NSS = NSTS. When STBC is true, NSS = NSTS/2.

Data Types: double
Complex Number Support: Yes

Common phase error in radians, returned as a column vector having length NSYM. NSYM is the number of OFDM symbols in the VHT data field.

Limitations

wlanVHTDataRecover processing limitations, restrictions, and recommendations:

  • If only VHT format PPDUs are processed, then isa(cfgVHT, 'wlanVHTConfig') must be true.

  • For single-user scenarios, cfgVHT.NumUsers must equal 1.

  • When STBC is enabled, the number of space-time streams must be even.

  • cfgRec.EqualizationMethod = 'ZF' is recommended when cfgVHT.STBC = true and cfgVHT.NumSpaceTimeStreams = 2

  • cfgRec.EqualizationMethod = 'ZF' is recommended when cfgVHT.NumSpaceTimeStreams = 1

More About

collapse all

VHT data field

The very high throughput data (VHT data) field is used to transmit one or more frames from the MAC layer. It follows the VHT-SIG-B field in the packet structure for the VHT format PPDUs.

The VHT data field is defined in IEEE® Std 802.11ac™-2013, Section 22.3.10. It is composed of four subfields.

  • Service field — Contains a seven-bit scrambler initialization state, one bit reserved for future considerations, and eight bits for the VHT-SIG-B CRC field.

  • PSDU — Variable-length field containing the PLCP service data unit. In 802.11, the PSDU can consist of an aggregate of several MAC service data units.

  • PHY Pad — Variable number of bits passed to the transmitter to create a complete OFDM symbol.

  • Tail — Bits used to terminate a convolutional code. Tail bits are not needed when LDPC is used.

References

[1] IEEE Std 802.11ac™-2013 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 — Amendment 4: Enhancements for Very High Throughput for Operation in Bands below 6 GHz.

Extended Capabilities

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

Introduced in R2015b


[1] IEEE Std 802.11ac-2013 Adapted and reprinted with permission from IEEE. Copyright IEEE 2013. All rights reserved.