LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how does the abscissa change from time domain to frequence domain when running a FFT?

I'm working on a program about broadband ultrasonic attenuation(BUA) and met a problem with X-scale of the waveform after FFT. I used 'FFT Spectrum (Mag-Phase)' vi, but the order of magnitude of X-scale seems not resonable compared with reference. I decided to use 'Real FFT' vi instead and calculate X-scale by myself, but don't know how to change the X-scale form time domain to frequence domian while FFT. Thanks!
0 Kudos
Message 1 of 8
(3,734 Views)
Hi,
the relation is:
df=1/(N*dt)
where - N is the number of samples in your signal, dt is the discretization time of your signal, and df is discretization frequency of your spectrum.

Good luck.

Oleg Chtuko.
Message 2 of 8
(3,734 Views)
The VI 'FFT Spectrum (Mag-Phase).vi' will do the conversion for you correctly (following the formula given by Oleg), but only if you are providing the correct information about your sample rate, through the dt value (dt = 1 / Fsampling). If you only input your data array to the VI, it will "assume" you are sampling at 1 Hz, that is dt = 1.0 and your df will not be what you expect. So make sure you are using a Waveform Data Type, not a simple array. Use the Build Waveform primitive (located in your Waveform palette) to build a waveform with the correct dt value.
Message 3 of 8
(3,734 Views)
Thanks for your reply. I tried to program today but found I forget to ask the method to calculate f0. I have a time waveform with a t0.
0 Kudos
Message 4 of 8
(3,734 Views)
Yes, I did use a time domain waveform when I use 'FFT Spectrum (Mag-Phase).vi'. And I want to know if the t0 of the waveform influence the f0 of output. Thanks.
0 Kudos
Message 5 of 8
(3,734 Views)
Hi,
f0=0. Always. It is doesn't depend upon t0.
This is the feature of FFT.

Oleg Chutko.
0 Kudos
Message 6 of 8
(3,734 Views)
No, the timestamp t0 will not have any affect on the value of df. df is the frequency resolution (in Hz) and always equal to the inverse of the waveform duration, so df = 1 / (N*dt). It only depends on dt and the size (number of samples N) of your data array.
0 Kudos
Message 7 of 8
(3,734 Views)
sorry, I mis-read your question. f0 is always equal zero (=dc) when you perform a simple FFT.
0 Kudos
Message 8 of 8
(3,734 Views)