sigal average power estimation
4 次查看(过去 30 天)
显示 更早的评论
Hi !
I've created a snippet to test my insight of power the density spectra computed from the fft matlab function. Unfortunately, I have a factor 4 between average power computed from the signal in the time domain and the average power estimated from the FFT. May I ask you some hints ? Regards. Here my snippet :
N=1024;
Fs=1e3;
Ts=1/Fs;
timeSlot = N*Ts;
tVect = (0:N-1)*Ts;
F_axis = (0:N-1)*Fs/N;
F_axis_Single = F_axis(1:length(F_axis)/2);
A2=2;A=sqrt(A2);
% number of harmonics
nH = 10;
% build a set of nH random frequencies ranged from 0 to Fs/2
freqIDs = sort(round((N/2)*rand(1,nH )));
setOfFreqs = F_axis_Single(freqIDs);
% buid a set of harmonics of frequencies defined above
noiseHarmos = A*sin(2*pi*tVect'*setOfFreqs);
noiseSig = sum(noiseHarmos,2);
% figure;plot(tVect,sigs);
fftSig_Db = fft(noiseSig);
fftSig_Sg = fftSig_Db(1:N/2); % FFT single sided coeff
fftSig_Sg(2:end) = 2*fftSig_Sg(2:end);
% norm of FFT
absFftSig_Sg = abs(fftSig_Sg); % /N to get FFT in V
absFftSig_Sg_V = abs(fftSig_Sg)/N; % /N to get FFT in V
% DSP
dspSigSg = absFftSig_Sg.^2/N;
% Average powa from time domain
powFromSig = mean(noiseSig.^2)
% Average powa from frequency domain
powFromDsp = sum(dspSigSg)/N
0 个评论
采纳的回答
Suneesh
2013-12-9
I guess what you are trying to verify is the validity of Parseval's theorem. Since FFT calculates the Discrete Fourier Transform (but not an (infinitely long) discrete-time Fourier transform ) a scaling is required. Please refer to the following links to clear this up:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!