LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency spacing needs to be embedded in data stream

Dear All,

I am acquiring analog signal and I am using 'filtering' , 'tone
measurements' , 'fft' express vi's.
I realized that fft found a peak frequency of a value which is 1000
times lower than the actual frequency. In my vi sampling rate is 1000
Hz, number of samples to be acquired is 1000. Looking at some examples
I figured out that I need the frequency spacing information.

Using 'build cluster' I merged FFT output with sampling rate and
resulting plot looked correct.
But this does not solve my problem, since I need to have the dynamic
data stream to be 'correct'. I need to find the frequency of a
different signal using 'tone measurements' express vi which currently
is giving a 1000 times lower value . I also want to use filtering vi,
which does work properly under this condition.

Any suggestion will be more than appreciated.

Regards,

ilter

0 Kudos
Message 1 of 10
(2,060 Views)
Under signal manipulation there is an Express VI called Align and Resample.  This lets you change the sampling rate and timing of a signal.

By the way, where is the sampling rate getting stripped off?  The signal includes a dT that represents your sampling rate and it should be correct.  If you can figure out where it is getting changed, that would be the best place to "fix it".

Hope that this helps,
Bob Young
0 Kudos
Message 2 of 10
(2,059 Views)
One thing about your problem strikes me as a possible issue.

You state that the FFT is finding a value 1000 times lower than you expected, and you are sampling at 1000 Hz. What frequency are expecting and what are you getting?

To correctly determine the frequency of a waveform, you need to smaple at two times faster than the highest frequency you expect to sample. This is called the "Nyquist Frequency". So if you are trying to sample a 1000 Hz signal and only smapling at 1000 Hz, you are running into another sampling phenomenon called the Alias Frequency. This page has some detailed information and samples on both of these.

This could explain why you are getting the low frequency from the FFT.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 3 of 10
(2,048 Views)

Hello,

In the attached example.vi picture  you can see that the FFT is bundled with frequency spacing. I thought my problem was the same, so I am not sure where sampling rate is stripped off. I would be happier to find the error and fix it rather than force it to believe what I tell to the program, but I will try the suggested express vi.

I am expecting a frequency of 60 Hz which I calculated through hotwire experiements, but I am getting 0.06 from 'tone measurements.vi'.

Thank you for your kind help.

ilter

ps. sorry for the duplicate message

 

0 Kudos
Message 4 of 10
(2,043 Views)
What are you using to actually acquire your data. Your example shows you just generating a sine wave. Does your data acquisition hardware have the ability to output a waveform with timing information rather than just an array of points?

You also could try using the "Build Waveform" function in the Waveform palette instead of the Build Cluster. This would at least give you a real waveform data type that might be easier to work with.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 5 of 10
(2,035 Views)
None of that is Express.  I thought you said that you were using the Express VIs like in the attached example.
Bob Young


Message Edited by Bob Y. on 05-02-2006 03:09 PM

0 Kudos
Message 6 of 10
(2,032 Views)
I am using Express FFT.vi, the example was just to show the bundled data.
 
Anyway using build waveform gives a reasonable answer but using 'Align and Resample.vi' gaves something very low. Would that make a problem? I mean can I just ignore the 'Align and Resample.vi' and use build waveform for my application? For build waveform and 'Align and Resample.vi'   dt=0.001. I am using hotwire anomometer to capture my data.
 
Thanks once again.
 
Regards.
 
ilter
0 Kudos
Message 7 of 10
(2,022 Views)
I guess I'm not sure exactly what's going on inside the Align and Resample.vi, but if you manually build a waveform and set dt=.0001, all the data points will be evenly spaced at .0001. So there should be no need for the Align and Resample.vi.

Could you post a small example of the problem you are seeing using the
Align and Resample.vi? If there's a bug in it, we need to report it.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 8 of 10
(2,019 Views)
Lets start from the beginning.

Could you post an example of the program that is giving you the problem that you would like to solve?  And while you are at it, an itemized list of the problems that you are seeing?  I would like to help, but I feel like I am shooting at a moving target in a hurricaneSmiley Happy.

Thanks,
Bob Young

0 Kudos
Message 9 of 10
(2,007 Views)
I am sorry for the late reply.
I still could not a way to send the vi. It is a bulky one that I cannot use 'print screen' to send the picture, and it has soem sub vi's that needs to be written dirctly. I will try to do it as soon as possible.
 
The problem with Align & Re sample is that program hang on when the dt is 0.001. It works when dt=0.01
 
I know it is not easy for you to help me this way so I do not expect anything until I work on more and make it more clear.
 
Thank you very much for your help.
 
ilter
0 Kudos
Message 10 of 10
(2,000 Views)