Reply by Mike December 8, 20042004-12-08
Stephan M. Bernsee wrote:
> On 2004-12-08 11:06:20 +0100, Stephan M. Bernsee
<spam@dspdimension.com> said:
> > > On 2004-12-08 10:52:35 +0100, johnbesel@web.de (Eugene) said: > > > >> If I have right, then I should get only one peak in FFT spectrum. > > > > One peak, yes, and possibly other non-zero bins (many people forget
> > about that). > > And actually, if your input signal is real you should get *two*
peaks, not one.
> > -- > Stephan M. Bernsee > http://www.dspdimension.com
Why not try something simpler to start with ? You could input 1 2 3 4 1 2 3 4 ... repeating to fill your input ( I am assuming that it's a power of two length > 4 ) with a nice repeating pattern - make sure that your imaginary inputs are all zero - then when you look at the output you should be able to check that the DC component is = sum of the input values (if your FFT doesn't rescale internally) with no imaginary part and that you get repeated zeros at the positions you expect and that the peaks you see are the right values and phases. Then you can just scale the input till it starts to fall apart due to arithmetic errors. Once you are happy that this simple input with a period that fits exactly into your FFT size is producing the values you expect you can have another look at the sine input. Best of luck - Mike
Reply by Stephan M. Bernsee December 8, 20042004-12-08
On 2004-12-08 11:06:20 +0100, Stephan M. Bernsee <spam@dspdimension.com> said:

> On 2004-12-08 10:52:35 +0100, johnbesel@web.de (Eugene) said: > >> If I have right, then I should get only one peak in FFT spectrum. > > One peak, yes, and possibly other non-zero bins (many people forget > about that).
And actually, if your input signal is real you should get *two* peaks, not one. -- Stephan M. Bernsee http://www.dspdimension.com
Reply by Stephan M. Bernsee December 8, 20042004-12-08
On 2004-12-08 10:52:35 +0100, johnbesel@web.de (Eugene) said:

> If I have right, then I should get only one peak in FFT spectrum.
One peak, yes, and possibly other non-zero bins (many people forget about that).
> but if I use fft function, and then show my result in "code composer > studio" in praph/time:frequency, then I see a lot of peaks.
Not without knowing what you do exactly. If your FFT is complex-valued and your sine wave is real, are you sure you assign the input values correctly? -- Stephan M. Bernsee http://www.dspdimension.com
Reply by Eugene December 8, 20042004-12-08
Hello,

I just started to work with DSP 320VC5416 and I try to build the FFT
of the sine signal.

If I have right, then I should get only one peak in FFT spectrum.

but if I use fft function, and then  show my result in "code composer
studio" in praph/time:frequency, then I see a lot of peaks.

I think, I should do some operation with output of the fft, but wich
operation should I do?

My output is symmetrically, and I have positiv and negativ magnitude.

Can anybody help me?

thanks in advance