⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 findfrm.m

📁 介绍OFDM的MATLAB的各种实现方式 帮助初学者能够较快理解和掌握
💻 M
字号:
function FrameStart= findfrm(SignalIn, FrameGap, quickrate,zerotime)
%FINDFRM Finds the start of a COFDM frame
%	FrameStart = findfrm(SignalIn, FrameGap, quickrate,zerotime)
%	Find the approximate starting location
%	zerotime : zeroed time of the guard period
%	Copyright Eric Lawrey 1997
%

SignalIn = abs(SignalIn);		%Envelope detect the signal

%=========================================
% Subsample to find approx start location
%=========================================
index = 1:quickrate:length(SignalIn);
SubSignal = SignalIn(index);	%Subsample the signal
SubFilt = filter(ones(1,(FrameGap/quickrate)),1,SubSignal);
SearchSig1 = SubFilt(FrameGap/quickrate:length(SubFilt));
approxstart = min((find(SearchSig1==min(SearchSig1))+...
		FrameGap/quickrate)*quickrate-zerotime);
%plot(SearchSig1);
%============================================================
% Narrow down the search to find the exact starting location
%============================================================
Offset = approxstart-1.1*FrameGap;	%Starting location of accurate search
EnvFilt = filter(ones(1,FrameGap),1,...
	  SignalIn(Offset:approxstart+FrameGap/3));
%plot(EnvFilt);

%============================================================================
%Find the minimum of the integral ensuring that it is at least one frame time
%before the end of the wave file. (ignore the first symbol period)
%============================================================================
SearchSig = EnvFilt(FrameGap:length(EnvFilt));
minsig = find(SearchSig==min(SearchSig))+FrameGap;

%Calc the expect start of the frame
%Pick the frame start just before the normal starting time to allow for timming
%errors in both directions, i.e. early and late
FrameStart = min(minsig-zerotime+Offset);
CalcStart = FrameStart;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -