LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT output

Hi, I used fft.vi to get the fft of a sine wave. A shot of my simple code is attached. My question is what does the y axis represent?Values in y axis change when values of amplitude,sampling rate and number of samples are changed. Thankyou
0 Kudos
Message 1 of 9
(4,740 Views)

Hi,

I used fft.vi to get the fft of a sine wave. A shot of my simple code is attached. My question is what does the y axis represent?Values in y axis change when values of amplitude,sampling rate and number of samples are changed.

0 Kudos
Message 2 of 9
(4,729 Views)

First of all there is not attachment in your posting.

Next all your observations are expected behavior.

There are many tutorials about FFT 'out there' that can teach you the basics of FFT, have you even tried to Google 'FFT' ?

An example of such presentation is:

http://www.ni.com/webcast/209/en/ 

0 Kudos
Message 3 of 9
(4,703 Views)
HI LocalDSP Thank you for answering. I have attached my code this time. My problem is, what does the values 100,200...500 represent in this code(When FFT.VI is used).I googled already .
0 Kudos
Message 4 of 9
(4,690 Views)
You can see 100,200,...500 on y-axis of fft when frequency of signal  is 50 Hz , phase=90, sampling frequency and number of samples=1000, amplitude =1. 
0 Kudos
Message 5 of 9
(4,688 Views)

Still no attachment and please do a little of research on your own as suggested. Try for example to search for 'FFT Tutorial' on Youtube.

0 Kudos
Message 6 of 9
(4,679 Views)

Duplicate thread



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(4,685 Views)

Merged the duplicate thread since that is the one that had the attachment.

0 Kudos
Message 8 of 9
(4,664 Views)

Hi jenifermaria

 

     Let me give you the 5 minute crash intro to FFT

     Please right-click on your FFT icon and select Help. This should open the help window for your sub-VI.

     Scroll down to the section named FFT Details 1D FFT

     There it tells you that the frequency resolution of your result array is Fs/N that is 1000/1000 = 1 Hz in your case.

     Therefore you'll see 'activity' for the 10th array element if your frequency is 10 Hz and so on.

     The FFT output is complexe and represents the amplitude and phase of your signal where the real values represents the 'cosine' and the imaginary values the 'sine' parts of your signal, that is why you see near zero (calculation noise) in the real array when your tone phase is a 0 (sine) and in the imaginary array when your tone phase is 90 deg (cosine).

     Any phase in between gives you non-zero values in both real and imaginary arrays.

     If you scroll all the way down in your Help window you can access the link Output Units for FFT-Based VIs

     The first row in the table tells you that the scaling for non-DC is N/2, that is 500 in your case where your amplitude is 1. That explains the value of 500 you were asking about.

      If your frequency is not an exact multiple of 1 Hz, the energy corresponding to your 'amplitude of 500' gets spread across multiple output array elements (called bins) and therefore you see lower values than 500 in the different bins.

 

      So thing 'energy' and remember that the total energy of your signal may be distributed in both the real and imaginary arrays and over multiple bins. Try to replace your Complex to Re/Im primitive with the Complex to Polar one. It may be easier to understand the two output since r will represent your signal amplitude and Theta the phase (in radians)

 

      From here it becomes more complicated and you'll have to find appropriate tutorials if you need more details on how to correctly use and interpret FFT.

 

Hope this helps as a kick-off for you to move on.

Message 9 of 9
(4,649 Views)