0

If I want to amplify a certain frequency in a digital signal, can I just take the FFT, increase the real part of the value for the frequency I want (leaving the imaginary part alone), and then take the inverse FFT? I am wanting to do this to increase the frequency at which tones are detected, for a Morse code decoder.

  • 2
    This approach is not for many reasons, bandpass filter (or even peaking filter) is way better choice. – jojeck Jul 23 '14 at 15:51

2 Answers2

2

A few reasons why this is a terrible idea:

  • Unless your frequency is an exact multiple of the FFT window size, it'll be spread over adjacent FFT bins.
  • You're mentioning Morse code, so your carrier is modulated. This is not a constant tone, it has a changing envelope, and thus, its spectrum is convolved by the spectrum of the envelope. As a result, you won't see just a spectral peak at the carrier frequency. Instead, it'll be spread over a frequency band proportional to the symbol rate.
  • Selectively "editing" FFT coefficients is equivalent to multiplying the spectrum by a function with sharp edges, and thus is equivalent to convolving in the time domain by a window with lots of ripples - causing ringing (More on this here).
  • Unless you want something ridiculously selective, a bandpass/peaking filter is cheaper in terms of computational cost. Moreover, using the FFT/IFFT approach on long signals (or in realtime) is possible only through the overlap-add method, which is less straightforward to implement than a filter.

Finally, there's no reason why you would want to leave the imaginary part unmodified.

pichenettes
  • 19,413
  • 1
  • 50
  • 69
0

No. Amplifying only the real part of an FFT result will only amplify signals that are symmetric in the FFT window. What if your desired tone happens to be anti-symmetric in that window?

hotpaw2
  • 35,346
  • 9
  • 47
  • 90