# understanding complex fft results

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 ?

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

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.

• 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 ) – nmxprime Mar 14 '14 at 11:16
• @nmxprime your expected output is symmetric. What does that say about the input? Read about symmetry properties of the Fourier Transform for background. – John Mar 14 '14 at 11:22
• 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? – nmxprime Mar 14 '14 at 11:59
• @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. – John Mar 14 '14 at 12:45
• Thanks john my doubt cleared. Accepting the answer to close this thread, though above comment answered my question! – nmxprime Mar 15 '14 at 7:29