wlanSymbolTimingEstimate
Fine symbol timing estimate using L-LTF
Syntax
Description
estimates the timing offset between the start of received
waveform startOffset
= wlanSymbolTimingEstimate(rxSig
,cbw
)rxSig
and the start of the
L-STF
1
for channel bandwidth
cbw
.
Note
This function supports OFDM-modulated signals only.
specifies
the threshold that the decision metric must meet or exceed to obtain
a symbol timing estimate.startOffset
= wlanSymbolTimingEstimate(rxSig
,cbw
,threshold
)
specifies an oversampling factor in addition to any input
argument combination from the previous syntaxes. Use this
syntax to estimate the timing offset for an oversampled
signal. startOffset
= wlanSymbolTimingEstimate(___,OversamplingFactor=osf
)
[
also returns the decision metric of the symbol
timing algorithm using any combination of input
arguments in previous syntaxes.startOffset
,M
]
= wlanSymbolTimingEstimate(___)
Examples
Detect HT Packet and Estimate Symbol Timing
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
Detect HT Packet and Set Threshold When Estimating Symbol Timing
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.
Estimate Symbol Timing of TGn-Impaired HT Waveform
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
Estimate VHT Packet Symbol Timing
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
rxSig
— Received signal
complex-valued matrix
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
cbw
— Channel bandwidth
'CBW5'
| 'CBW10'
| 'CBW20'
| 'CBW40'
| 'CBW80'
| 'CBW160'
| 'CBW320'
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
threshold
— Decision threshold
1
(default) | scalar in the interval [0, 1]
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
osf
— Oversampling factor
1
(default) | scalar greater than or equal to 1
Oversampling factor, specified as a scalar greater than or equal to 1. The oversampled cyclic prefix length must be an integer number of samples.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Output Arguments
startOffset
— Timing offset
integer | []
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
M
— Cross-correlation
real-valued row vector
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 NS – L + 1.
Data Types: double
More About
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.
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 320 | 312.5 | 3.2 μs | 8 μs |
10 | 156.25 | 6.4 μs | 16 μs |
5 | 78.125 | 12.8 μs | 32 μ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.
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, 160, and 320 | 312.5 | 3.2 μs | 1.6 μs | 8 μs |
10 | 156.25 | 6.4 μs | 3.2 μs | 16 μs |
5 | 78.125 | 12.8 μs | 6.4 μs | 32 μ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].
FFT-Based Oversampling
An oversampled signal is a signal sampled at a frequency that is higher than the Nyquist rate. WLAN signals maximize occupied bandwidth by using small guardbands, which can pose problems for anti-imaging and anti-aliasing filters. Oversampling increases the guardband width relative to the total signal bandwidth, which increases the number of samples in the signal.
This diagram shows the oversampling process for an OFDM waveform with NFFT subcarriers made up of Ng guardband subcarriers on either side of Nst occupied bandwidth subcarriers.
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 R2017aR2024b: Process oversampled waveforms
This function now supports processing oversampled waveforms. To
use this feature, specify the osf
argument as a scalar greater than
1.
See Also
1 IEEE® Std 802.11-2012 Adapted and reprinted with permission from IEEE. Copyright IEEE 2012. All rights reserved.
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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)