The purpose of a window is to lower bin-to-bin leakage. It is only useful when the FFT is the final product, since it changes the signal. Think of it this way -- you are multiplying a signal in the time domain when you window. If you window, then FFT, then IFFT, you will get back the windowed signal, not the original signal.
Matt On Mon, Nov 18, 2013 at 5:33 AM, Tom Rondeau <t...@trondeau.com> wrote: > On Mon, Nov 18, 2013 at 8:22 AM, Robert James <srobertja...@gmail.com> > wrote: > > On 11/18/13, Marcus Müller <mar...@hostalia.de> wrote: > >> Hi Robert! > >> > >> This is strange -- but could be explained by the fact that numerical > >> inaccuracy don't allow us to *exactly* recreate all values during > fft-ifft > >> operation. > >> Also, make sure you use a rectangular window. > > > > Wow, switching to a rectangular window of fft_size solved it! I'm > > baffled: I know windows are a way of pretransforming the wave prior to > > FFT, to eliminate artifacts. I just used the default window. Why did > > I need a rectangular window here? In what other cases do I need it? > > Were both windows the same or different? I've often seen people trying > this experiment using a window on the forward FFT but no window on the > inverse FFT. That would obviously cause different output results. > > > Now, the only discrepancy I see is that the FFT->IFFT ended up > > *increasing* the amplitutde by a constant (not sure why or what the > > constant is). > > The constant is N for an N-point FFT. It's part of the common > algorithms for computing FFTs to grow the value without scaling it > back, since that's an added extra step and we want our FFTs to be > fast. You can use a multiply_const_cc block with constant (1.0/fftlen) > after the vector-to-stream block to rescale it yourself. > > Tom > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio