rms correction factor for fft

10 Ansichten (letzte 30 Tage)
Melissa
Melissa am 30 Jul. 2014
Bearbeitet: Melissa am 1 Aug. 2014
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 Kommentar
Matz Johansson Bergström
Matz Johansson Bergström am 30 Jul. 2014
Maybe upload HPC and TimeDomain as variables instead of copy/paste in here.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 30 Jul. 2014
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