LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT and scan rate of "AI Scan"

I am using DAQ NI 6110 to do continuous data acquisition. For instance, I am writing a 1500 Hz signal and then reading the same 1500 Hz signal. I will be doing a FFT on the read 1500 Hz signal. I realised that the actual scan rate of the VI "AI Scan" is not quite the scan rate I wired into "AI Scan".

In what way will this affect the FFT? For example, will the actual frequency of the read signal not be at the required 1500 Hz (but at slightly +/- 1500 Hz)? If so, how do I correct this? This error may affect the accuracy of my FFT.
0 Kudos
Message 1 of 5
(3,155 Views)
First, I don't know what you mean when you say that the scan rate isn't what you select. That doesn't sound right. You should look into that.

Second of all, if you are reading in a signal that you generate 1500 Hertz, you need to acquire the signal at a significantly higher rate that you generate it at in order to avoid nyquist frequency problems. I don't remember everything well enough to tell you exactly what frequency to scan at, but I think you would be safe with about 150kHz would be more than adequate.

As for your FFT, once you get the proper scan rate, you should be okay with your FFT. However; if it isn't you will have to figure out the exact error, and then add the shift back into your results. For example, if your scan rate is +1%, just s
ubract 0.01 from your results (I think...)
0 Kudos
Message 2 of 5
(3,155 Views)
Thanks for the reply!

You said, ""First, I don't know what you mean when you say that the scan rate isn't what you select. That doesn't sound right. You should look into that."

If you look at "AI scan", there is an input wire called "scan rate". There is also an output wire called "actual scan rate". This gives you an idea of the actual scan rate that is taking place in the DAQ board. And this rate may be slightly different from what you have requested using the input wire "scan rate".

And yup, I have sampled fast enough to avoid the Nyquist problem by many times.

You said, "For example, if your scan rate is +1%, just subract 0.01 from your results".

I don't quite get it. Sorry. Subtract 0.01 from what results?
0 Kudos
Message 3 of 5
(3,155 Views)
DAQ will do its best to sample at the rate you request.

If the harware can't exactly match the spec sample rate, it will sample at a rate as close to the requested as is possible with the given hardware.

You should use the value returned by AI Scan to analyze the data.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(3,155 Views)
LabVIEW hides so much of the data acquisition from the user it is really easy to become confused when one gets down to what is really happening. Sometimes it is best to experiment with your hardware.

Although you specify a scan rate, the hardware cannot necessary operate at that rate. It will be really close but not always exactly on the money. With a little experimenting you can see that actual scan rate is used in the waveform's dt (create an indicator on the waveform to see it) and not a dt implied by the user's desired scan rate. This means that the waveform outputed from ai scan will be just like the waveform sampled. There will not be any kind of expansion or compression that might change the waveform's frequencies. Thus, your FFT should be as ac
curate as ever.

Jeremy
0 Kudos
Message 5 of 5
(3,155 Views)