本文基于 L-LTF(Legacy Long Training Field)精确估计 WLAN 信号的符号时序偏移。通过与本地生成的 L-LTF 进行互相关,确定接收信号中 L-STF(Legacy Short Training Field)的起始位置。
算法原理
-
生成本地 L-LTF:根据信道带宽生成本地 L-LTF 序列。
-
互相关计算:对接收信号
x与本地 L-LTF 进行互相关操作:
corr = filter(conj(flipud(LLTF(:, 1))), 1, x);
3. 计算决策度量:
4. 初始时序估计:通过寻找 M 的最大值确定初始时序偏移:
公式说明
- ninitial:表示初始时序估计值。
- argmaxn:表示在所有可能的 n 中,使 M(n) 达到最大值的 n 的位置。
- M(n):表示决策度量函数,用于评估符号时序的匹配程度。
- 这个公式表示 ninitial 是使决策度量 M(n) 达到最大值的索引位置,用于确定符号时序的初始估计。
参考代码
% Generate L-LTF
LLTF = wlan.internal.legacyLTF(chanBW);
% startOffset and M are returned as empty when input signal length is less
% than that of L-LTF
L = size(LLTF, 1);
if size(x, 1) < L
startOffset = [];
M = [];
return;
end
% Calculate cross-correlation between x and L-LTF from the 1st antenna
corr = filter(conj(flipud(LLTF(:, 1))), 1, x);
% Calculate decision metric and get initial timing estimate
Metric = sum(abs(corr(L:end, :)).^2, 2);
[Mmax, nInitial] = max(Metric);
% Refine timing estimate by taking into account cyclic shift delay (CSD)
deltaCSD = 200e-9*fs; % The largest CSD defined in 802.11n/ac
if (nInitial + deltaCSD) > length(Metric)
idx = find(Metric(nInitial:end) >= threshold*Mmax, 1, 'last');
else
idx = find(Metric(nInitial:nInitial + deltaCSD) >= threshold*Mmax, 1, 'last');
end
nMax = nInitial + (idx - 1);
% Prepare the output
startOffset = nMax - L - 1;
M = double(Metric); % For codegen
3193

被折叠的 条评论
为什么被折叠?



