Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!quanta.eng.ohio-state.edu!kaa.eng.ohio-state.edu!rob From: rob@kaa.eng.ohio-state.edu (Rob Carriere) Newsgroups: comp.dsp Subject: Re: FFT Window Effects Message-ID: <3461@quanta.eng.ohio-state.edu> Date: 9 Nov 89 19:16:46 GMT References: <2564@radio.oakhill.UUCP> <2615@ge-dab.GE.COM> Sender: news@quanta.eng.ohio-state.edu Reply-To: rob@kaa.eng.ohio-state.edu (Rob Carriere) Organization: Ohio State Univ, College of Engineering Lines: 61 In article <2615@ge-dab.GE.COM> harrison@sunny.UUCP (Gregory Harrison) writes: >In article <2564@radio.oakhill.UUCP> charlie@oakhill.UUCP (Charlie Thompson) writes: >>window might affect the signal and noise power calculations. Since >>the window 'smears' the harmonics into adjacent bins it must likewise >>do so to the noise bins...thus affecting the noise power calculation. [lit ref deleted] >I thought that the smearing was due to the discontinuities at the >edges of the input time series, and that the window is applied >in an attempt to decrease the smearing, as opposed to causing it. Windows are a trade-off between two kinds of trouble. The DFT of a window function generally looks something like this (doncha love VT100 graphics :-) /\ ----^^^^^^^/ \^^^^^^----- where /\ is the main lobe and ^ are the side lobes. The trade-off is / \ between how wide the main lobe is (how much smear you get) and how far down the side lobes are (how much distortion you get). The rectangular window has a nice, narrow main lobe, but awfully large sidelobes. Other windowing functions repress the side lobes to some degree, at the price of increasing the width of the main lobe (typically by a factor 2). So what you want depends on what you want (y'know, like a=a :-). If you want accurate placement of the strong signal components, rectangular is fine. If you're worried about the weak components' right to an accurate representation, you need some other window. Assuming that the noise is weaker than the signal, the latter is what seems most applicable in this situation. >Are you looking for distortion due to quantization, or due to >other signal energy in the input signal. [lit ref deleted] >Possibly a good method to get a close approximation to the noise would >be to take the FFT of the signal, go in and set the frequency components >(bins) immediately around the sine wave peak to zero for both >positive and negative components. Then apply Parseval's Theorem >on the remaining frequency components. In other words, sum up the Yes. If you want to get fancy, zero-pad so that the couple of bins you throw away won't matter too much. If you want to get very fancy, interpolate values for these bins from the surrounding ones. >squares of the remaining components to get the total noise power in the >spectrum. If the noise power is much lower than the sine wave, I would >think that a good approximation to the noise power in the signal can be >gained in this manner. Assuming that the noise is aperiodic, and of low >amplitude, smearing due to discontinuities of the noise at the edges >of the input spectrum should be negligable in amplitude. This may at >least provide a basis of comparison between input samples. Of course, as several people have already pointed out, if you actually _know_ the frequency of that sine wave, you don't want to do FFT at all. In fact, even if you don't, you may want to look into some parametric methods (this is known in the literature as the problem of estimating sinusoids in noise -- for some reason :-) -- ). One place to start would be the Marple book I plugged a couple of postings back in another thread. SR