Main Content

wlanSymbolTimingEstimate

Fine symbol timing estimate using L-LTF

Description

example

startOffset = wlanSymbolTimingEstimate(rxSig,cbw) estimates the timing offset between the start of received waveform rxSig to the start of the L-STF 1 for channel bandwidth cbw.

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 using any combination of input arguments in 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)
startOffset = 5
threshold = 0.1
threshold = 0.1000
startOffset = wlanSymbolTimingEstimate(nonHTFields, ...
    cfgHT.ChannelBandwidth,threshold)
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 a complex-valued matrix of size NS-by-NR. NS is the number of time-domain samples in the L-LTF and NR is the number of receive antennas.

Data Types: single | double
Complex Number Support: Yes

Channel bandwidth, specified as one of these values.

  • 'CBW5' – Channel bandwidth of 5 MHz

  • 'CBW10' – Channel bandwidth of 10 MHz

  • 'CBW20' – Channel bandwidth of 20 MHz

  • 'CBW40' – Channel bandwidth of 40 MHz

  • 'CBW80' – Channel bandwidth of 80 MHz

  • 'CBW160' – Channel bandwidth of 160 MHz

  • 'CBW320' – Channel bandwidth of 320 MHz

Data Types: char | string

Decision threshold, specified as a scalar in the interval [0, 1].

To maximize the packet reception performance, you can try different valued of this input. For channels with small delay spread with respect to the cyclic prefix length, MathWorks® recommends the default value. For a wireless channel with large delay spread with respect to the cyclic prefix length, such as TGn channel with 'Model E' delay profile, MathWorks suggests a value of 0.5.

By lowering the threshold setting, you add a nonnegative 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

Timing offset, in samples, between the start of rxSig and the start of the L-STF, returned as an integer in the interval [–L, NS– 2L]. L is the length of the L-LTF and NS is the number of samples. Using the cbw input to determine the range of symbol timing, the function 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.

  • The function returns this output as [] when NS is less than L.

  • The function returns this output as a negative integer when the input waveform does not contain a complete L-STF.

Data Types: double

Cross-correlation between the received signal and the locally generated L-LTF of the first transmit antenna, returned as a real-valued row vector of length NSL + 1.

Data Types: double

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 EHT, HE, VHT, HT, and non-HT PPDUs.

L-STF location within legacy preamble.

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, 160, and 320312.53.2 μs8 μs
10156.256.4 μs16 μs
578.12512.8 μs32 μs

Because the sequence has good correlation properties, receivers use it for start-of-packet detection, coarse frequency correction, and 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 bandwidth segments is one.

L-LTF

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

The L-LTF, second in the legacy preamble

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 cyclic prefix followed by the two long training symbols in the L-LTF

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, 160, and 320312.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 section 21.3.8.2.1 and Table 21-10 of [1].

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.

Extended Capabilities

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

Version History

Introduced in R2017a


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