LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT without spikes

Hi,
 
I'm trying to understand a VI written to input voltages from 8 channels and perform an FFT on it (amongst other things). To perform the FFT measurements, the Spectral Measurements Express VI was used. However, when I run the program with the required inputs, the amplitude versus frequency graph does not have spikes in it, rather it has a straight lines. Is this normal or expected depending on the type of data that you input?
 
I've attached the VI with the following input data (I chose 8 channels for the input (ai0:7), sampling rate 5000 Hz, samples per channel 5000, I believe the output section of the VI does not affect this particular FFT graph).
 
Thanks for any help.
 
Ruf.
0 Kudos
Message 1 of 6
(3,376 Views)
I have several questions:
1. You refer to spikes and straight lines on the FFT. What is you expected signal and what are you observing?
2. Without your signal source we have no way of evaluating the problem unless you provide typical data. Run your program and acquire some typical data. Make the data displayed on the AI Graph default. The remove the DAQ VIs and make the AI Graph a control. Save the simplified VI and post that.
3. Eliminate the sequence structure. Dataflow is all that is needed.
4. Straighten wires, avoid hiding wires behind other objects, and keep the dataflow left to right. These make it much easier to follow what is going on. Check the Style Guides.
5. Consider changing the "equal to i" comparison in the loop to "greater than or equal." Think about what happens if someone sets the Total Time control to -2 before running the VI.

Lynn
0 Kudos
Message 2 of 6
(3,365 Views)

Hey Lynn,

Thank you for the quick reply. Unfortunately, this particular VI was coded by someone else, and not having heard of LabVIEW just a week ago, I know how you must have felt when you saw that. That kept aside, I've actually figured out how he's done things. The reason I posted this thread was because I entered some some data using a simulated device just to see what type of FFT graph I get. I would not really know exactly how the these signals will look like, since I'm using pressure transducers to  measure them inside a tunnel.

However, not having learned about signal processing, I was baffled by the FFT graph it gave me. I thought it would give me spikey graph with a large amplitude at a particular point corresponding to a resonant frequency, which come to think of it now, is quite stupid because the simulated signal is probably nothing like what I'm expecting to get. So, i think I'm gonna have to wait till I actually get some real data from the wind tunnel.

One thing which I couldn't understand was why he's used some of the DAQ VIs, I know what it does, but not sure why he had to use some of them (For example, the DAQmx Timing property nodes at SampRateClick instance etc.) Would be very grateful if you could give me some help on that.

Cheers.

Ruf.

0 Kudos
Message 3 of 6
(3,348 Views)

Simulated signals are typically a pure tone (probably 60 or 100Hz on each channel with a slight phase offset) or sometimes a square ware, depends on the device you have selected for simulation.  If it is a pure tume you would expect the fft to give you a single spike at the frequency of the signal.  for the square wave case, you expect the frequency and its odd harmonics to be the spikes.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 6
(3,334 Views)
cheers for the reply Paul.
 
I guess I have to wait till I can get the actual inputs from the transducers (have no idea what they will be like). Any idea on those DAQ VIs he used or is there a NI Tutorial or Example on that you know of?
 
Thanks.
 
Ruf.
0 Kudos
Message 5 of 6
(3,322 Views)

Looks like there is 2 Daq tasks (Daq are data acquisition functions) he is setting up an AI (Analog in task) and an IO Task.  The AI will measure a response to the AO?  AO is putting out a waveform and the response is peasured and run through the fft.  This is a general guess since the code could use some serious style upgrades.  There are many examples on daq and dqmx functions in labview to play with.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 6
(3,304 Views)