0
$\begingroup$

i use this for complex fft.

Output expected

$fft[3].real= 32$ (peak at 3rd bin)

$fft[61].real= 32$ ((peak at negative frequency pair of 3rd bin))

All other values negligibly small

The input is

$ y.real = \sin (2\pi*3i/64)$ where $i = 0 \to 63$

$ y.imaginary = \sin (0*3i/64)$ where $i = 0 \to 63$ (all zero)

The output i got

$fft[3].imaginary = -32$ (peak at 3rd bin)

$fft[61].imaginary = 32$ ((peak at negative frequency pair of 3rd bin))

All other values negligibly small

This is the first time i am working with complex input fft. Can somebody explain me why i am getting peaks in imaginary part and not in real part of fft. As of my understanding doing Real FFT is nothing but using one half of input as Real part input and other half as Imaginary part input to the Compelx radix 2 FFT algorithm [i remember from John G Proakis textbook]. But i don't understand why this pseudo complex signal produces this kind of output. Also can someone explain me the phase information of this pseudo complex wave ?

$\endgroup$
3
  • $\begingroup$ Are you sure about the input? To me, the real part looks rather close to zero. I can't reproduce your results. $\endgroup$
    – user7358
    Mar 14, 2014 at 10:03
  • $\begingroup$ @user7358 which real part are you talking about. All the real part of fft are zero for me $\endgroup$
    – nmxprime
    Mar 14, 2014 at 10:17
  • 1
    $\begingroup$ @user7358. Sorry a small typo fixed. i am new to LaTex. Please see the updated question $\endgroup$
    – nmxprime
    Mar 14, 2014 at 11:06

1 Answer 1

1
$\begingroup$

Your expected output can be achieved when the input is as follows:

real part = cos(2*pi*[0:63]*3/64)

imag part = 0

So I think you have a couple of issues:

  1. You are missing a factor 1/64 in your description of the input above.
  2. You should use cos() instead of sin() for the real part of the input.

Try fixing issue 1 in your post, and try fixing issue 2 in your code.

$\endgroup$
5
  • $\begingroup$ Actual code had 1/64. Here i missed it because of typing LaTex(new to LaTex). Changing it to cos should work, rather i want to know why?(if i lag necessary background,please point me to some documents ) $\endgroup$
    – nmxprime
    Mar 14, 2014 at 11:16
  • $\begingroup$ @nmxprime your expected output is symmetric. What does that say about the input? Read about symmetry properties of the Fourier Transform for background. $\endgroup$
    – John
    Mar 14, 2014 at 11:22
  • $\begingroup$ My expected output is symmetric if my input is even signal. As my input is odd(sine) signal, i got anti-symmetric output. Am i right? My question is why i got value in imaginary part and not in real part? $\endgroup$
    – nmxprime
    Mar 14, 2014 at 11:59
  • $\begingroup$ @nmxprime a characteristic of odd functions is that their Fourier Transform is purely imaginary (no real part). To prove this to yourself use Euler's Identity for the sine and plug into the definition of the FT. $\endgroup$
    – John
    Mar 14, 2014 at 12:45
  • $\begingroup$ Thanks john my doubt cleared. Accepting the answer to close this thread, though above comment answered my question! $\endgroup$
    – nmxprime
    Mar 15, 2014 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.