필터 지우기
필터 지우기

Accurately calculate the spectrum energy (scaling, window and other concerns)

조회 수: 3 (최근 30일)
Bach
Bach 2012년 7월 26일
Hi,
I am studying on how to calculate the energy within a frequency band. I tried to use the psd function as well as the fft function. The code is as follows.
h = spectrum.periodogram('Hann');
Hpsd = psd(h,xframe,'NFFT',2^13,'Spectrumtype','Twosided','Fs',Fs);
and
frame_fft = abs(fft(xframe.*hann(length(xframe)),2^13));
frame_psd = frame_fft.^2/Fs/length(xframe);
I found that the Hann window used in each function has a different gain, which leads to the different results.
So my question is how to get a PSD with accurate values (w/wo window function)? In addition, could anybody please explain why we need to divide the Fs and frame length to normalize the scale? I tried to look into the psd function but couldn't understand the 'KMU' variable which is the 'Normalizing scale factor'.
Any help will be appreciated, Bach

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by