LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT

I am currently performing an FFT analysis on data that I am capturing using a USB6009. The sample rate is 1000Hz.
 
The graph I get from the FFT block has an x-axis (frequency) in the range 0-499Hz with intervals of what appears to be approximately 5Hz (the spacing between peaks on the graph).
 
THe two questions I have are as follows:
 
1.  I am interested in only the first 50Hz of the FFT graph. When I change the range of the graph to 50Hz it displays the output of the FFT in the range 449 to 499Hz. How can I get it to display the output in the range 0 to 50Hz.
 
2. As I am only interested in a small portion of the graph, I would like to reduce the spacing between the peaks. I would like to display the output with an interval of 0.5 to 1 Hz. IS this possible and if so how do i go about it.
 
Thanks in advance for your help.
 
Peter Cruickshank

Message Edited by Peter8PG on 03-29-2006 02:53 AM

0 Kudos
Message 1 of 6
(3,069 Views)
Aaaah... Another victim of the numbered-question-killer!
Can you post (a portion of) your code where you build up the graph?

Paolo

Message Edited by pincpanter on 03-29-2006 09:57 AM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 6
(3,062 Views)
Simply,
 
I am using the DAQ assistant to acquire the signal. This is then passed into the spectral measurements VI. I then output the result on a graph. Nothing overly complicated at the moment as I want to sort out the displaying of the output before I do any signal processing.
 
Peter
 
I should possibly add that I am just a beginner with LabView!

Message Edited by Peter8PG on 03-29-2006 04:42 AM

0 Kudos
Message 3 of 6
(3,051 Views)
Ok I will try to answer.

1) I don't understand the reason for this, anyway, if the scale is shown in Hz and not simply data points, I would use a property node to set the XScale Range Minimum to 0 (as it should be already), Maximum to 50 (to create a property node, right click on the graph and select Create -> Property Node)

2) with a 1000 Hz sampling, you have a maximum useful frequency range of 500 Hz in your FFT as you mentioned. This range contains N/2 data points, where N is the number of input samples. To get a spacing of 0.5 to 1 Hz you should input to the FFT transform at least 2000 samples (for 1 Hz) or 4000 (for 0.5 Hz)

You can find useful info on FFT under LabView in the documentation (under Help->Search the LabView Bookshelf, or search analcon.pdf and fftmeas.pdf on disk).


Paolo

Message Edited by pincpanter on 03-29-2006 01:12 PM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 6
(3,041 Views)
Hi, I was trying out something similar, but i could not get property node to be set to what I want. The XScale.Max and XScale.Min are all in output terms, I thought they could be written over?
 
Well, for my case, I wanted min: 0 hz, max: 30 hz
 
For simplicity sake, since I'm just picking LV up, I placed a Simulate Signal "Sine" and connected it to Waveform Graph, I followed your words but property nodes automatically changed to 0-0.1. Is it easier if I just change the properties of the graph from the interface and switch auto-scaling off?
 
For me, I want to capture a window during 0-30 hz after the time domain signal undergone FFT, and the readings must be at a frequency resolution of 0.5 hz. i.e. 0-30 hz but per 0.5 hz increment each time.
 
Sry for bumping up old thread, it seemed rather similar. I am just a beginner, and apologizes if there isn't enough information.
0 Kudos
Message 5 of 6
(2,854 Views)
Range Max and and Range Min can be overwritten, just right-click on the property and set to write. And yes, if you don't need to change the range dynamically, you can manually set the range and switch autoscale off for the X axis.

Your range is 0 - 30 Hz, so you need to sample at a rate >= 60 Hz. Moreover, to achieve a 0.5 Hz resolution you need in any case a number of samples twice the frequency, for example 120 samples at 60 Hz.
 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 6
(2,829 Views)