From help-octave-request at bevo dot che dot wisc dot edu Fri Dec 7 13:08:39 2001 Subject: Re: need help filtering a signal From: John Day To: help-octave at bevo dot che dot wisc dot edu Date: Fri, 07 Dec 2001 14:02:30 -0500 Philipp, Re-reading your message I see that you want to exclude everything but small bands of signals, so you do need a "band pass" filter, not a "notch" filter as I had claimed. Sorry for the confusion. Most filtering algorithms can be easily set up to do this. -jday At 11:57 AM 12/7/01 -0500, John Day wrote: >Philipp, > >What you want to do is apply a "notch" filter to your signal, which is the >converse of a "band pass" filter. > >Filtering can be applied in either the time or freq domain. They are >equivalent in terms of linear transformations. > >Your attempt to filter by cutting frequencies out of an FFT is in the >frequency domain. At first glance this seems ideal, because you seem to be >able to zero out any arbitrary band of frequencies. But this is an >illusion. You are only constraining the sampled points in the FFT. The >points in between are not constrained to zero, so this won't work >"perfectly", as you might have imagined. You can make it "better" by >increasing the FFT size, but perfection would demand an infinite number of >points. > >In the time domain, you achieve the same results by convolving a filter >against the sampled points. Again, a perfect filter does not exist, but is >the limit as the filter length goes to infinity. A filter to "notch" out a >single frequency would have to be rather long and it will spill over >somewhat and attenuate neighboring frequencies. You will have to determine >how "steep" the walls of your filter will have to be. > >Practical time-domain filters can be built with the Remez algorithm. A >message was posted in Oct detailing an Octave version of this algorithm, >under the subject:"An octave port of Remez algorithm to design linear >phase FIR filters". > >HTH, >John Day >Computer Science Innovations > >At 05:34 PM 12/7/01 +0100, Philipp Schwaha wrote: >>hi! >> >>what i need to do is fiter a signal to remove noise. what i wanted to try >>first was a fft then cut all frequencies except the the important ones (e.g >>100Hz, 200Hz ...), but when i did the fft i did not know how to do this, >>since there are no frequencies associated with the values the function fft >>returns. >>this is the first time i try to do something using an fft. >>then i discovered the function fftfilter, but i could not make it produce the >>results i wanted. >> >>how can i remove all frequencies from a certain signal, except a few selected >>ones? >> >>thanks >>philipp >> >> >> >>------------------------------------------------------------- >>Octave is freely available under the terms of the GNU GPL. >> >>Octave's home on the web: http://www.octave.org >>How to fund new projects: http://www.octave.org/funding.html >>Subscription information: http://www.octave.org/archive.html >>------------------------------------------------------------- > > > >------------------------------------------------------------- >Octave is freely available under the terms of the GNU GPL. > >Octave's home on the web: http://www.octave.org >How to fund new projects: http://www.octave.org/funding.html >Subscription information: http://www.octave.org/archive.html >------------------------------------------------------------- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------