Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems measuring frequency with FFT

I am performing a frequency measurement of continuos analog signals using the "Extract Single Tone Information.vi" and it is necessary the front
panel to be updated 10 times per second (10Hz) and also 100 times per second(100Hz).

To acquire the signal, the "AI Config", "AIStart" and "AI Read" vi´s are employed and to select the frequency of front panel updating I just change
the "numbers of scan to read" and "scan rate" parameters in order to keep their ratio equals to 0.1 or 0.01.

If the selected frequency is 10 Hz( the ratio between "numbers of scan to read" and "scan rate" is 0.1 , the result (frequency of the analog signal
measured)is correct. However, when I change the ratio to 0.1, the result comes wrong (much
higher than what is expected).

Why does it happen and how can I fix this problem?
0 Kudos
Message 1 of 3
(2,936 Views)
Hey Germano,

I took a look at the program you posted on the web site. After I removed the file writing, digital output, and analog output I was able to execute your program. You are correct that it is unable to perform FFTs on low frequencies. The reason is that you are sampling at 5000Hz or .2ms and reading only 50 samples each time. This means that you are reading a total of 10ms of data and trying to perform a FFT on 100ms of data for a 10Hz signal. This is not possible, because you do not a have a full period. You will need to slow down your analog input or read more data each time the loop executes. I would suggest setting the rate and samples read so that you are reading in at least a few periods to improve that accuracy of the FFT.

I hope this he
lps out.

Joshua P.
National Instruments
0 Kudos
Message 2 of 3
(2,936 Views)
Hi Josh,

Finally it was possible for me to understand why that problem was occurring. Thanks for your comment, it was very clarifying.

Germano
0 Kudos
Message 3 of 3
(2,936 Views)