sigal average power estimation
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sylvain Rousseau
le 9 Déc 2013
Modifié(e) : Sylvain Rousseau
le 10 Déc 2013
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 commentaires
Réponse acceptée
Suneesh
le 9 Déc 2013
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:
1 commentaire
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!