1

So if I were to have an $n$ length sample of a given sample rate and were to run it through an FFT, resulting in $n$ complex elements. How would I obtain the frequency bins, such that if I know the frequency of some noise, I can remove the noise?

lennon310
  • 3,590
  • 19
  • 24
  • 27
user11508
  • 21
  • 1

1 Answers1

1

If the noise is extremely narrow-band (a perfect sinusoid), exactly integer periodic within the length n samples, and completely disjoint in the frequency domain from the non-noise signal of interest, then you might be able to zero FFT bin number (F_noise * n / F_sample_rate) and IFFT the result.

If the noise is wide band, or of a frequency not exactly at an FFT result bin center, then a time domain filter might be more suitable from removing noise without serious distortion artifacts. Although you might be able to use an FFT/IFFT overlap add/save algorithm method to implement a time-domain FIR filter.

hotpaw2
  • 35,346
  • 9
  • 47
  • 90