noise removal

Greetings, I have a signal captured in a pc for certain duration of signal.I want to remove the noise from the signal.The signal of interest is the
fundamental component of the signal and I think if I can find the fundamental component of the received signal by using FFT(thanks to comp.dsp) I can separate it out and automatically the noise frequency components will be removed. I have taken 1000 samples of the signal per second. By googling I have found the formula and approach for FFT.Now the question I have is how to fix the value of N(called the bin).Can I take it to be 10000? Any help will be appreciated. Thanks.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I'm guessing here that N is your array size. Generally this will be a value of 2**N, eg. 64, 256, 1024,.... The FFT algorithm naturally works with ensembles of this size. As an example, for the sample rate you quote and an array size of 1024, the resultant 'phasor' arrays (real and imag frequency arrays) will have 512 members each, and will go from 0 to 512 Hz, in increments of 1 Hz.
You should also do some investigation on aliasing and window error, particularly if your signal is small in relation to the noise, and *particularly* if there are likely to be any other periodic components present. FFT is a very dangerous technique in terms of turning small spurious signals into 'data'. It's even more dangerous when you display the results on a log scale. Good luck.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Bruce Varley wrote:

There are efficient FFTs for sizes that aren't powers of two. Power-of-two FFTs are easiest to explain.
Counting by ones from 0 to 512 gives 513 integers.
Jerry
--
"The rights of the best of men are secured only as the
rights of the vilest and most abhorrent are protected."
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Noted, Jerry. The other error in my posting is that the max frequency will be sample freq / 2 which is 500 Hz, not 512.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Bruce Varley wrote:
...

Which shows clearly that I'm not a reliable nit picker.
Jerry
--
"The rights of the best of men are secured only as the
rights of the vilest and most abhorrent are protected."
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

First, we hope that the signal of interest is reasonably below 500Hz and that it is reasonably above 1Hz...
Why? Because you have taken N=1,000 samples over T=1 second. Because you took 1 second of data, the frequency resolution will be 1/T = 1 Hz. Because you sampled at 1kHz, there will be aliasing unless the signal content in its entirety pretty much has all the energy below fs/2 = 500Hz.
Then, compute the FT of the N=1,000 samples and observe where the fundamental peak lies in frequency.
Then you *might* multiply in frequency by a bandpass filter to attentuate the other frequency components - taking care that the filter function is symmetrical around fs/2 between zero and 1,000Hz (and the sample at 1,000 Hz is understood to be the same value as at 0 Hz and is not present in the sequence). Then compute the inverse FFT, the IFFT. Doing it just this way will cause some time-domain spreading/aliasing.
Or, you might simply use the information gained by observation and filter the original time sequence in the time domain using a bandpass filter that is centered on the fundamental frequency you've determined. Of course, if you already know the fundamental frequency then you don't need to compute an FFT at all according to this set of instructions.
Well, again, unless you want to do the filtering by multiplying in the frequency domain. Either way, you need to design a filter.
If you design a finite impulse response (FIR) filter then you will likely get the coefficients as an output of the design program. THe length M sequence of coefficients is the unit sample response in time. Convolve with the time samples. OR FFT those coefficients (padded with enough zeros to get at least 1,000 + M -1 samples) and multiply with the FFT of the data (padded to the same length) point-by-point in the frequency domain. Then IFFT the result.
If the filter is h(t) and the data is f(t) then FFT=H(w) and FFT=F(w)
Convolving method: f(t)*h(t) = out(t)
Multiplying in frequency method: h'(t)=h(t) with zeros appended to get to N+M-1 points f'(t)=f(t) with zero appended to get to N+MN-1 points. (both must have the same number of points)
FFT h'(t) > H'(w) FFT f'(t) > F'(w) Multiply H'(w) X F'(w) = OUT(w) .... a complex multiply IFFT > out(t)
Fred
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Dnia Thu, 02 Nov 2006 04:25:54 +0100, I am not Einstein

If you have data and know frequency of interest why can't you do a discrete filtering in time domain (it is more or less adding and dividing of samples, like moving average etc. ). This is much easier and faster and simplier then FFT and should give a great results. Just Z-transform some band-pass filter and compute your data.
P.S. You will be able to easily change the band-pass frequency of your filter.
--
Mikolaj

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Greetings, Sorry for my delay .Thanks for all your help.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.