From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to detect low frequency signals with a high sampling rate?

Hello everyone,

 

I'm having an issue detecting low frequency signals with a high sampling rate.  Shouldn't I be able to detect the frequencies as long as the sampling rate is at least 2 times the highest frequency I will measure?  The frequency range I am measuring is 5-25 Hz, and I use Extract Single Tone.vi to measure the frequency.  The sampling setting I am using is 2 samples at 10 kHz.  Is there a method I can use to make this work?

 

Attached is the vi.

0 Kudos
Message 1 of 4
(2,206 Views)

By telling the DAQmx Timing VI number of samples of 2, you are setting the buffer size to 2.  You are constantly overwriting your buffer.  Leave that unwired when using Continuous Acquisition.  While you are at it, you probably should not be simply grabbing 2 samples.  Just use -1 to get all of the samples.  You also might want to throw in a wait in your loop so you aren't hammering the CPU and give enough time for the DAQ to acquire the data.  If you are looking for a 5Hz signal, you need to acquire data for at least 200ms.  Set the loop rate to more like 500ms.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,203 Views)

You are sampling at 10Ks/S, but only taking two samples. What do you expect to see? If your signals are binary (On or Off) you would only see either an on or an off, or if the rise/fall time was fast and you were Extremely lucky, one of each. If you want to see a waveform you have to sample for at least the period of a waveform. So you should take samples for at least 0.2 seconds to capture an entire waveform at 5Hz, ideally longer.   Think of looking at a tide change at a dock. If you want to see the entire tide change you will probably have to measure repeatedly over 24 hours, not just run out on the dock, measure the height twice and leave. That wouldn't tell you anything other than at that precise moment the tide height was X, but not that it was at high tide, low tide, in between, etc.

 

 

I type too slowly, I see that a more technical answer has been given, so mine will be the philosophical one!

 

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 4
(2,198 Views)

In addition to the advice you have already been given, Extract Single Tone.vi uses FFT internally. The FFT may not work well unless it has 3-5 cycles of data and 10 or more are better.  So a second's worth of samples is probably about the minimum you should use for good results.

 

Lynn

0 Kudos
Message 4 of 4
(2,179 Views)