LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between sampled output and real-time frequency display

Solved!
Go to solution

Hello,

I am an engineering student and new to LabView and signals sampling.

I was sampling a 500Hz and 1,000Hz signals with 500Hz sampling rate (low sampling rate on purpose, in order to check sampling limitations and aliasing phenomenon).

In both cases, LabView returned a 5Hz signal frequency, however the real-time display showed a difference between the two signals. Also, when trying to plot the output vectors on Matlab, I get different frequencies.

What could be the cause for the mismatch between the presented frequency and the graph?

attaching printscreens of both cases. I am aware that the printscreen for 1000Hz signals shows different value in number of points to buffer, this wasn't the cause, as I did wait long enough.

1,000Hz signal (left picture):

1000Hz sig.jpg500Hz sig.jpg

500Hz signal (right picture):

 

Equipment used:

NI-USB-621x data acquisition device.

LabView

Matrix MFG-82XX function generator.

 

Thank you!

 

0 Kudos
Message 1 of 3
(2,580 Views)
Solution
Accepted by topic author shlomish3

You didn't attach the VI, just a picture of the front panel. I'm not clairvoyant, so I don't know what is actually going on. Looking at the settings on the front panel, I can try and make an educated guess.

 

You are sampling at 500 Hz. You have another field "vector length for FFT" set to 100. BIN_WIDTH = Fs / N, or as in your case the bin width is 500Hz / 100 = 5 Hz. That is your SMALLEST frequency resolution of the FFT. I'm assuming that is why all you answers equal 5 Hz.

 

Try increasing the "vector length" to at least 1000. That will give you a 0.5 Hz resolution. Depending on your actual data, you may need to increase it even further.

Message 2 of 3
(2,558 Views)

Thank you very much, that was my problem!

0 Kudos
Message 3 of 3
(2,549 Views)