# wlanVHTLTFDemodulate

Demodulate VHT-LTF waveform

## Syntax

## Description

## Examples

### Demodulate Received VHT-LTF Signal

Create a VHT format configuration object.

vht = wlanVHTConfig;

Generate a VHT-LTF signal.

txVHTLTF = wlanVHTLTF(vht);

Add white noise to the signal.

rxVHTLTF = awgn(txVHTLTF,1);

Demodulate the received signal.

y = wlanVHTLTFDemodulate(rxVHTLTF,vht);

### Demodulate VHT-LTF and Estimate Channel Coefficients

Specify a VHT format configuration object and generate a VHT-LTF.

vht = wlanVHTConfig; txltf = wlanVHTLTF(vht);

Multiply the transmitted VHT-LTF by 0.1 + 0.1i. Pass the signal through an AWGN channel.

```
rxltfNoNoise = txltf * complex(0.1,0.1);
rxltf = awgn(rxltfNoNoise,20,'measured');
```

Demodulated the received VHT-LTF with a symbol offset of 0.5.

dltf = wlanVHTLTFDemodulate(rxltf,vht,0.5);

Estimate the channel using the demodulated VHT-LTF. Plot the result.

chEst = wlanVHTLTFChannelEstimate(dltf,vht); scatterplot(chEst)

The estimate is very close to the previously introduced 0.1+0.1i multiplier.

### Extract VHT-LTF and Recover VHT Data

Generate a VHT waveform. Extract and demodulate the VHT long training field (VHT-LTF) to estimate the channel coefficients. Recover the data field by using the channel estimate and use this field to determine the number of bit errors.

Configure a VHT-format configuration object with two paths.

vht = wlanVHTConfig('NumTransmitAntennas',2,'NumSpaceTimeStreams',2);

Generate a random PSDU and create the corresponding VHT waveform.

txPSDU = randi([0 1],8*vht.PSDULength,1); txSig = wlanWaveformGenerator(txPSDU,vht);

Pass the signal through a TGac 2x2 MIMO channel.

tgacChan = wlanTGacChannel('NumTransmitAntennas',2,'NumReceiveAntennas',2, ... 'LargeScaleFadingEffect','Pathloss and shadowing'); rxSigNoNoise = tgacChan(txSig);

Add AWGN to the received signal. Set the noise variance for the case in which the receiver has a 9-dB noise figure.

nVar = 10^((-228.6+10*log10(290)+10*log10(80e6)+9)/10); awgnChan = comm.AWGNChannel('NoiseMethod','Variance','Variance',nVar); rxSig = awgnChan(rxSigNoNoise);

Determine the indices for the VHT-LTF and extract the field from the received signal.

```
indVHT = wlanFieldIndices(vht,'VHT-LTF');
rxLTF = rxSig(indVHT(1):indVHT(2),:);
```

Demodulate the VHT-LTF and estimate the channel coefficients.

dLTF = wlanVHTLTFDemodulate(rxLTF,vht); chEst = wlanVHTLTFChannelEstimate(dLTF,vht);

Extract the VHT-Data field and recover the information bits.

```
indData = wlanFieldIndices(vht,'VHT-Data');
rxData = rxSig(indData(1):indData(2),:);
rxPSDU = wlanVHTDataRecover(rxData,chEst,nVar,vht);
```

Determine the number of bit errors.

numErrs = biterr(txPSDU,rxPSDU)

numErrs = 0

### Recover Bits from VHT Signal Transmitted through MU-MIMO Channel

Recover bits from the VHT-Data field of a VHT multi-user transmission recovered from a fading MU-MIMO channel by using channel estimation on the VHT-LTF.

This example can return high bit error rates because the transmission does not include precoding to mitigate the interference between space-time streams. However, the example shows a typical VHT signal recovery workflow and appropriate syntax use for the functions.

Configure a VHT transmission with a channel bandwidth of 160 MHz, 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]; cfgVHT = wlanVHTConfig('ChannelBandwidth',cbw,'NumUsers',2, ... 'NumTransmitAntennas',4,'NumSpaceTimeStreams',numSTS);

Generate a payload of bits for each user. This payload must be in a 1-by-*N* cell array, where *N* is the number of users.

psduLength = 8*cfgVHT.PSDULength; numUsers = cfgVHT.NumUsers; bits = cell(1,2); for nu = 1:numUsers bits{nu} = randi([0 1],psduLength(nu),1); end

Generate VHT-LTF and VHT-Data field signals.

txLTF = wlanVHTLTF(cfgVHT); txDataSym = wlanVHTData(bits,cfgVHT);

Pass the VHT-Data field signal for the first user through a 4x1 channel because this signal consists of a single space-time stream. Pass the VHT-Data field for the second user through a 4x3 channel because this signal consists of three space-time streams. Apply AWGN to each signal, assuming an SNR of 15 dB.

snr = 15; H{1} = complex(randn(4,1),randn(4,1))/sqrt(2); H{2} = complex(randn(4,3),randn(4,3))/sqrt(2); number = zeros(2,1); ratio = zeros(2,1); for userIdx = 1:numUsers rxDataSym = awgn(txDataSym*H{userIdx},snr,'measured');

Apply the same channel processing to the VHT-LTF for each user.

` rxLTF = awgn(txLTF*H{userIdx},snr,'measured');`

Calculate the received signal power for each user and estimate the noise variance.

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

Estimate the channel characteristics by using the VHT-LTF.

demod = wlanVHTLTFDemodulate(rxLTF,cbw,numSTS); chEst = wlanVHTLTFChannelEstimate(demod,cbw,numSTS);

Recover the bits from the received VHT-Data field for each user and determine the bit error rate by comparing the recovered bits with the original payload bits.

```
dataBits = wlanVHTDataRecover(rxDataSym,chEst,noiseVarEst,cfgVHT,userIdx);
[number(userIdx),ratio(userIdx)] = biterr(bits{userIdx},dataBits);
disp(number(userIdx))
disp(ratio(userIdx))
end
```

4232

0.5038

2434

0.0964

## Input Arguments

`rx`

— Received time-domain signal

complex-valued matrix

Received time-domain signal, specified as a
complex-valued matrix of size
*N*_{s}-by-*N*_{r}.

*N*_{s}is the number of time-domain samples. If*N*_{s}is not an integer multiple of the OFDM symbol length,*L*_{s}, for the specified field,then the function ignores the remaining`mod(`

symbols.*N*_{s},*L*_{s})*N*_{r}is the number of receive antennas.

**Data Types: **`double`

| `single`

**Complex Number Support: **Yes

`cfg`

— VHT format configuration

`wlanVHTConfig`

object

VHT format configuration, specified as a
`wlanVHTConfig`

object.

`cbw`

— Channel bandwidth

`'CBW20'`

| `'CBW40'`

| `'CBW80'`

| `'CBW160'`

Channel bandwidth, specified as
`'CBW20'`

,
`'CBW40'`

,
`'CBW80'`

, or
`'CBW160'`

. If the transmission
has multiple users, the same channel bandwidth is
applied to all users.

**Data Types: **`char`

| `string`

`numSTS`

— Number of space-time streams

integer from 1 to 8 | 1-by-*N*_{Users}
vector of integers from 1 to 4

_{Users}

Number of space-time streams in the transmission, specified as a scalar or vector.

For a single user, the number of space-time streams is an integer scalar from 1 to 8.

For multiple users, the number of space-time streams is a 1-by-

*N*vector of integers from 1 to 4, where the vector length,_{Users}*N*, is an integer from 1 to 4._{Users}

**Example: **`[1 3 2]`

indicates
that one space-time stream is assigned to user 1,
three space-time streams are assigned to user 2,
and two space-time streams are assigned to user
3.

**Note**

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

`symOffset`

— OFDM symbol sampling offset

`0.75`

(default) | scalar in the interval [0, 1]

OFDM symbol sampling offset, as a fraction of the cyclic prefix length, specified as a scalar in the interval [0, 1].

The value that you specify indicates the start location for OFDM demodulation relative to the beginning of the cyclic prefix.

**Example: **`0.45`

**Data Types: **`double`

| `single`

## Output Arguments

`sym`

— Demodulated frequency-domain signal

complex-valued array

Demodulated frequency-domain signal,
returned as a complex-valued array of size
*N*_{sc}-by-*N*_{sym}-by-*N*_{r}.

*N*_{sc}is the number of active occupied subcarriers in the demodulated field.*N*_{sym}is the number of OFDM symbols.*N*_{r}is the number of receive antennas.

**Data Types: **`double`

| `single`

**Complex Number Support: **Yes

## More About

### VHT-LTF

The very high throughput long training field (VHT-LTF) is between the VHT-STF and VHT-SIG-B portion of the VHT packet.

It is used for MIMO channel estimation and pilot subcarrier tracking. The VHT-LTF includes one VHT long training symbol for each spatial stream indicated by the selected modulation and coding scheme (MCS). Each symbol is 4 μs long. A maximum of eight symbols are permitted in the VHT-LTF.

For a detailed description of the VHT-LTF, see Section 21.3.8.3.5 of IEEE^{®} Std 802.11™-2016.

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

[2] 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™.

## Version History

**Introduced in R2015b**

### R2024a: Single precision support

This function supports single-precision values for its numeric input arguments.

## See Also

^{1} IEEE Std 802.11ac™-2013 Adapted and reprinted
with permission from IEEE. Copyright IEEE 2013. 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)