From: Johannes Schmitz on 13 Aug 2010 06:32 Hi, my first question in here.. So I know I can calculate RMS in frequency domain as derived from Parseval's Theorem. See for example Wikipedia: http://en.wikipedia.org/wiki/Root_mean_square#RMS_in_frequency_domain But what if I have applied a windowing function before doing the fft? In my case a Hann window. Now the RMS values are not correct any more. Does anyone have a solution how to fix this?
From: dbd on 13 Aug 2010 07:23 On Aug 13, 3:32 am, "Johannes Schmitz" <jsem...(a)gmx.de> wrote: > Hi, my first question in here.. > > So I know I can calculate RMS in frequency domain as derived from Parseval's Theorem. See for example Wikipedia:http://en.wikipedia.org/wiki/Root_mean_square#RMS_in_frequency_domain > > But what if I have applied a windowing function before doing the fft? In my case a Hann window. Now the RMS values are not correct any more. > > Does anyone have a solution how to fix this? Divide the windowed RMS by the coherent gain of the window applied. You can get some coherent gains from Table 1 of: http://utdallas.edu/~cpb021000/EE%204361/Great%20DSP%20Papers/Harris%20on%20Windows.pdf (Note: Some lines in the table containing "Blackman" contain errors) Dale B. Dalrymple
From: Steve Amphlett on 13 Aug 2010 07:31 "Johannes Schmitz" <jsemail(a)gmx.de> wrote in message <i436v7$l33$1(a)fred.mathworks.com>... > Hi, my first question in here.. > > So I know I can calculate RMS in frequency domain as derived from Parseval's Theorem. See for example Wikipedia: http://en.wikipedia.org/wiki/Root_mean_square#RMS_in_frequency_domain > > But what if I have applied a windowing function before doing the fft? In my case a Hann window. Now the RMS values are not correct any more. > > Does anyone have a solution how to fix this? Look up correction factors and scale your spectra by them. Choose amplitude or energy depending on what you want preserved. For the Hann(infg) window, they are: Amplitude: 2 Energy: sqrt(8/3) % Check in Matlab h=hanning(n); % Lenth of window is n samples amp_corr=1/(sum(h)/length(h)); % mean en_corr=1/sqrt(sum(h.^2)/length(h)); % RMS
From: dbd on 13 Aug 2010 10:26 On Aug 13, 4:31 am, "Steve Amphlett" <Firstname.Lastn...(a)Where-I- Work.com> wrote: > "Johannes Schmitz" <jsem...(a)gmx.de> wrote in message <i436v7$l3...(a)fred.mathworks.com>... > >... > > Does anyone have a solution how to fix this? > Look up correction factors and scale your spectra by them. Choose amplitude or energy depending on what you want preserved. For the Hann(infg) window, they are: > > Amplitude: 2 > Energy: sqrt(8/3) > > % Check in Matlab > > h=hanning(n); % Lenth of window is n samples > amp_corr=1/(sum(h)/length(h)); % mean > en_corr=1/sqrt(sum(h.^2)/length(h)); % RMS At first pass I took the question to be what to do given only the RMS sum. My answer would not be exact, but would be a reasonable approach given no further information. But if you get to start over from scratch, the Parseval version would be to just not window. For situations that fall in between these two cases you need to explain what the purpose of the calculation is and what the nature of the signal is to pin down the exact form of the answer. And if you want to try to be exact, the window application version is hanning(n,'periodic'). Dale B. Dalrymple
|
Pages: 1 Prev: How to 'detect' zeros between two non-zeros numbers ? Next: 4FSK |