LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform FFT

Here is what I have done.

 

I used Bob's "element" as a data source.

 

Removed the mean to reduce the size of the DC or zero-frequency component. 

 

Converted the complex output of FFT.vi to magnitude and pahse and plot the phase.

 

The only thing I changed from the default settings on Waveform Graph 2 is the Y-axis mapping to logarithmic.

 

Lynn

0 Kudos
Message 31 of 45
(1,514 Views)

Lynn, thank you. It looks much clearly for me, but you added FFT.vi, as you said to get freq range (-inf;+inf), but I dont get a two things: how to get on the x-axis the frequency, NOT a numbers likes 100, 10000 and so on, I need to have a frequency, how to do that? I think it supposed to be done something if dT or sampling. You calculated FFT form Magnitude and have got a spectra, it is the same to do for phase? Please look at my example, I need that it looks like the same situation (y-axis mag, x-axis frequency) on the example. 

 

1.bmp

0 Kudos
Message 32 of 45
(1,510 Views)

To change the axis labels just select the labels with the text tool and type what you want. 

 

To change the marker values on the X-axis you can use the X Scale: Multiplier and X Scale: Offset properties.

 

Lynn

Message 33 of 45
(1,501 Views)

Lynn, I want to get a freq domain and plot it with amplitude domain and phase domain. It is possible? That is why I am trying to do and get a graph. Can you help with code and re-fixed it? I dont know how to get plot the freq on the x-asis, you have seen too, that according data on the x-asis it is just numbers or it is sample numbers, I need a freq. Thank you

0 Kudos
Message 34 of 45
(1,496 Views)

How to see frequency on X-axis? Not numbers i.e 10.000 as are at my code

0 Kudos
Message 35 of 45
(1,481 Views)

Exactly, how to extract frequency from FFT spectrum?

0 Kudos
Message 36 of 45
(1,461 Views)

A waveform consists of 3 main parts,  T0  (time of the 0th element), dT,  time between elements, and an array of Y which is the magnitude of each sample of the waveform.

 

When you pass that through the FFT, you get a cluster that is very similar in construction to the waveform.  You get an F0  (frequency of the zeroth element which is almost always 0.   a dF, the difference in frequencies of each element of the array.  And the array which is consistes of the magnitude of each frequency.

 

So if you have a value of 100 in the 10th elemente of the array.  That means you have an amplitude of 100 at a frequency of 10 * dF.  If dF is 1 Hz, then the magnitude is 100 at 10 Hz.

 

Feeding that cluster into a waveform graph, because of its similar construction, allows you to see an FFT graph.

0 Kudos
Message 37 of 45
(1,456 Views)

Thank you. RavensFan, I have a waveform with dT 5microseconds and I want to multiply this waveform with basic generator sinusoid, how to get the same dT to sinusoid? it is dT of waveform will be the same 5microsendos if I will dT to "basic generator sinusoioid" of plugin called"cycles"? 

 

Thank you

0 Kudos
Message 38 of 45
(1,451 Views)

There are several different functions that can create a sinewave.  Just make sure whichever one you pick, you use the same dT when creating the sinewave.

 

I'd have to see a VI using whichever sine wave creator you are using to know if you have the inputs wired correctly.

0 Kudos
Message 39 of 45
(1,441 Views)

Thanks, I want to use "basic function generator". I am trying to do 200000 samples with dT 0,000005. How to do it with "basic generator"? Should I do samples with cycles calculation, but where to connect?

 

Thank you

0 Kudos
Message 40 of 45
(1,437 Views)