rms correction factor for fft

10 次查看(过去 30 天)
Melissa
Melissa 2014-7-30
编辑: Melissa 2014-8-1
Good Afternoon All,
I am looking to apply a correction factor to the fft for a hanning window. I have looked and have seen 2*sqrt(8/3) for most literature in matlab and have stumbled across this page (<http://mathforum.org/kb/thread.jspa?threadID=2060176&messageID=7150679#7150679>)
which says the correction factor to be 2/sqrt(2);
How can I determine which correction function to use in my code?
%Importing data file
Data=xlsread('GME_DOE_LVO_2mm_90C_DOE_run_1.xls','DOE_run=1');
TimeDomain=Data(:,2);
HPC=Data(:,4);
N=length(HPC);
dF=(TimeDomain(end)-TimeDomain(1));
FS=N/dF;
FreqRange=(0:N-1)*FS/N;
FreqRange=FreqRange';
win=hann(N,'periodic');
p=HPC.*win;
P = fft(p,N);
P = 2*sqrt(2)*P/N; %2*sqrt(2) correction error
Mag=abs(P);
Phase=angle(P)*180/pi; % in degrees
  1 个评论
Matz Johansson Bergström
Maybe upload HPC and TimeDomain as variables instead of copy/paste in here.

请先登录,再进行评论。

回答(1 个)

Image Analyst
Image Analyst 2014-7-30
How are you defining linear averaging? You mean like convolving with a rect function? That's the same thing as multiplying your signal spectrum by a sinc function in Fourier space, since the FT or a rect is a sinc. So just do that then inverse FT and you have your signal.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by