Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

wlanSymbolTimingEstimate

Fine symbol timing estimate using L-LTF

Syntax

startOffset = wlanSymbolTimingEstimate(rxSig,cbw)
startOffset = wlanSymbolTimingEstimate(rxSig,cbw,threshold)
[startOffset,M] = wlanSymbolTimingEstimate(___)

Description

example

startOffset = wlanSymbolTimingEstimate(rxSig,cbw) returns the offset from the start of the input waveform to the estimated start of the L-STF [1] .

example

startOffset = wlanSymbolTimingEstimate(rxSig,cbw,threshold) specifies the threshold that the decision metric must meet or exceed to obtain a symbol timing estimate.

example

[startOffset,M] = wlanSymbolTimingEstimate(___) also returns the decision metric of the symbol timing algorithm for the received time-domain waveform, using any of the input arguments in the previous syntaxes.

Examples

collapse all

Detect a received 802.11n™ packet and estimate its symbol timing at 20 dB SNR.

Create an HT format configuration object and TGn channel configuration object.

cfgHT = wlanHTConfig;
tgn = wlanTGnChannel;

Generate a transmit waveform and add a delay at the start of the waveform.

txWaveform = wlanWaveformGenerator([1;0;0;1],cfgHT);
txWaveform = [zeros(100,1);txWaveform];

Pass the waveform through the TGn channel model and add noise.

SNR = 20; % In decibels
fadedSig = tgn(txWaveform);
rxWaveform = awgn(fadedSig,SNR,0);

Detect the packet. Extract the non-HT fields. Estimate the fine packet offset using the coarse detection for the first symbol of the waveform and the non-HT preamble field indices.

startOffset = wlanPacketDetect(rxWaveform,cfgHT.ChannelBandwidth);
ind = wlanFieldIndices(cfgHT);
nonHTFields = rxWaveform(startOffset+(ind.LSTF(1):ind.LSIG(2)),:);

startOffset = wlanSymbolTimingEstimate(nonHTFields, ...
    cfgHT.ChannelBandwidth)
startOffset =

     6

Impair an HT waveform by passing it through a TGn channel configured to model a large delay spread. Detect the waveform and estimate the symbol timing. Adjust the decision metric threshold and estimate the symbol timing again.

Create an HT format configuration object and TGn channel configuration object. Specify the Model-E delay profile, which introduces a large delay spread.

cfgHT = wlanHTConfig;

tgn = wlanTGnChannel;
tgn.DelayProfile = 'Model-E';

Generate a transmit waveform and add a delay at the start of the waveform.

txWaveform = wlanWaveformGenerator([1;0;0;1],cfgHT);
txWaveform = [zeros(100,1);txWaveform];

Pass the waveform through the TGn channel model and add noise.

SNR = 50; % In decibels
fadedSig = tgn(txWaveform);
rxWaveform = awgn(fadedSig,SNR,0);

Detect the packet. Extract the non-HT fields. Estimate the fine packet offset using the coarse detection for the first symbol of the waveform and the non-HT preamble field indices. Adjust the decision metric threshold and estimate the fine packet offset again.

startOffset = wlanPacketDetect(rxWaveform,cfgHT.ChannelBandwidth);
ind = wlanFieldIndices(cfgHT);
nonHTFields = rxWaveform(startOffset+(ind.LSTF(1):ind.LSIG(2)),:);

startOffset = wlanSymbolTimingEstimate(nonHTFields, ...
    cfgHT.ChannelBandwidth)
threshold = 0.1
startOffset = wlanSymbolTimingEstimate(nonHTFields, ...
    cfgHT.ChannelBandwidth,threshold)
startOffset =

     5


threshold =

    0.1000


startOffset =

     9

Detecting the correct timing offset is more challenging for a channel model with large delay spread. For large delay spread channels, you can try lowering the threshold setting to see if performance improves in an end-to-end simulation.

Detect a received 802.11n™ packet and estimate its symbol timing at 15 dB SNR.

Create an HT format configuration object. Specify two transmit antennas and two space-time streams.

cfgHT = wlanHTConfig;
nAnt = 2;
cfgHT.NumTransmitAntennas = nAnt;
cfgHT.NumSpaceTimeStreams = nAnt;

Show the logic behind the MCS selection for BPSK modulation.

if cfgHT.NumSpaceTimeStreams == 1
    cfgHT.MCS = 0;
elseif cfgHT.NumSpaceTimeStreams == 2
    cfgHT.MCS = 8;
elseif cfgHT.NumSpaceTimeStreams == 3
    cfgHT.MCS = 16;
elseif cfgHT.NumSpaceTimeStreams == 4
    cfgHT.MCS = 24;
end

Generate a transmit waveform and add a delay at the start of the waveform.

txWaveform = wlanWaveformGenerator([1;0;0;1],cfgHT);
txWaveform = [zeros(100,cfgHT.NumTransmitAntennas);txWaveform];

Create a TGn channel configuration object for two transmit antennas and two receive antennas. Specify the Model-B delay profile. Pass the waveform through the TGn channel model and add noise.

tgn = wlanTGnChannel;
tgn.NumTransmitAntennas = nAnt;
tgn.NumReceiveAntennas = nAnt;
tgn.DelayProfile = 'Model-B';

SNR = 15; % In decibels
fadedSig = tgn(txWaveform);
rxWaveform = awgn(fadedSig,SNR,0);

Detect the packet. Extract the non-HT fields. Estimate the fine packet offset using the coarse detection for the first symbol of the waveform and the non-HT preamble field indices.

startOffset = wlanPacketDetect(rxWaveform,cfgHT.ChannelBandwidth);
ind = wlanFieldIndices(cfgHT);
nonHTFields = rxWaveform(startOffset+(ind.LSTF(1):ind.LSIG(2)),:);

startOffset = wlanSymbolTimingEstimate(nonHTFields, ...
    cfgHT.ChannelBandwidth)
startOffset =

     8

Return the symbol timing and decision metric of an 802.11ac™ packet without channel impairments.

Create a VHT format configuration object. Specify two transmit antennas and two space-time streams.

cfgVHT = wlanVHTConfig;
cfgVHT.NumTransmitAntennas = 2;
cfgVHT.NumSpaceTimeStreams = 2;

Generate a VHT format transmit waveform. Add a 50-sample delay at the start of the waveform.

txWaveform = wlanWaveformGenerator([1;0;0;1],cfgVHT);
txWaveform = [zeros(50,cfgVHT.NumTransmitAntennas); txWaveform];

Extract the non-HT preamble fields. Obtain the timing offset estimate and decision metric.

ind = wlanFieldIndices(cfgVHT);
nonhtfields = txWaveform(ind.LSTF(1):ind.LSIG(2),:);
[startOffset,M] = wlanSymbolTimingEstimate(nonhtfields, ...
    cfgVHT.ChannelBandwidth);

Plot the returned decision metric for the non-HT preamble of the VHT format transmission waveform.

figure
plot(M)
xlabel('Symbol Timing Index')
ylabel('Decision Metric (M)')

Input Arguments

collapse all

Received signal containing an L-LTF, specified as an NS-by-NR matrix. NS is the number of time-domain samples in the L-LTF and NR is the number of receive antennas.

Data Types: double
Complex Number Support: Yes

Channel bandwidth in MHz, specified as 'CBW5', 'CBW10', 'CBW20', 'CBW40', 'CBW80', or 'CBW160'.

Data Types: char | string

Decision threshold, specified as a real scalar from 0 to 1.

You can try out different threshold to maximize the packet reception performance. For channels with small delay spread with respect to the cyclic prefix length, the default value is recommended. For a wireless channel with large delay spread with respect to the cyclic prefix length, such as TGn channel with 'Model E' delay profile, a value of 0.5 is suggested.

By lowering the threshold setting, you add a non-negative corrector to the symbol timing estimate as compared to the estimate using the default threshold setting. The range of the timing corrector is [0, CSD ns/sampling duration]. For more information, see Cyclic Shift Delay (CSD).

Data Types: double

Output Arguments

collapse all

Offset of L-STF start, returned as an integer within the range [–L, NS–2L], where L is the length of the L-LTF and NS is the number of samples. Using the input channel bandwidth (cbw) to determine the range of symbol timing, wlanSymbolTimingEstimate estimates the offset to the start of L-STF by cross-correlating the received signal with a locally generated L-LTF of the first antenna.

  • startOffset is empty when NS < L.

  • startOffset is negative when the input waveform does not contain a complete L-STF.

Cross-correlation, returned as an (NSL+1)-by-1 vector. M is the cross-correlation between the received signal and the locally generated L-LTF of the first transmit antenna.

More About

collapse all

L-STF

The legacy short training field (L-STF) is the first field of the 802.11™ OFDM PLCP legacy preamble. The L-STF is a component of VHT, HT, and non-HT PPDUs.

The L-STF duration varies with channel bandwidth.

Channel Bandwidth (MHz)Subcarrier Frequency Spacing, ΔF (kHz)Fast Fourier Transform (FFT) Period (TFFT = 1 / ΔF)L-STF Duration (TSHORT = 10 × TFFT / 4)
20, 40, 80, and 160312.53.2 μs8 μs
10156.256.4 μs16 μs
578.12512.8 μs32 μs

Because the sequence has good correlation properties, it is used for start-of-packet detection, for coarse frequency correction, and for setting the AGC. The sequence uses 12 of the 52 subcarriers that are available per 20 MHz channel bandwidth segment. For 5 MHz, 10 MHz, and 20 MHz bandwidths, the number of channel bandwidths segments is 1.

L-LTF

The legacy long training field (L-LTF) is the second field in the 802.11 OFDM PLCP legacy preamble. The L-LTF is a component of VHT, HT, and non-HT PPDUs.

Channel estimation, fine frequency offset estimation, and fine symbol timing offset estimation rely on the L-LTF.

The L-LTF is composed of a cyclic prefix (CP) followed by two identical long training symbols (C1 and C2). The CP consists of the second half of the long training symbol.

The L-LTF duration varies with channel bandwidth.

Channel Bandwidth (MHz)Subcarrier Frequency Spacing, ΔF (kHz)Fast Fourier Transform (FFT) Period (TFFT = 1 / ΔF)Cyclic Prefix or Training Symbol Guard Interval (GI2) Duration (TGI2 = TFFT / 2)L-LTF Duration (TLONG = TGI2 + 2 × TFFT)
20, 40, 80, and 160312.53.2 μs1.6 μs8 μs
10156.256.4 μs3.2 μs16 μs
578.12512.8 μs6.4 μs32 μs

Cyclic Shift Delay (CSD)

A CSD is added to the L-LTF for each transmit antenna, which causes multiple strong peaks in the correlation function M. The multiple peaks affect the accuracy of fine symbol timing estimation. For more information, see IEEE® 802.11ac™, Section 22.3.8.2.1 and Table 22-10.

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.

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

Introduced in R2017a


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

Was this topic helpful?