LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Calculate Frequency From Waveform

I have an array of data pulled in off a magnetic, inductive pulse pickup as shown below. I want to know the passing speed relative to the sample rate so I can display an rpm value. I have a way that works fine in post-processing where I interpolate the zero crossing of the rising spike between samples, but now my customer wants to see it in a control on the screen in real time.

 

It doesn't have to be as accurate as my zero-crossing method, I just need a solid estimate. I've tried various fft methods I've used successfully in the past for sine-wave type data, but those functions aren't working well with the spiky, inductive waveform at hand (with the windowing and fft functions I've tried anyway).

 

Anyone with more experience than I have a suggestion for a computationally fast method calculating a pretty solid frequency for this type of signal? Maybe some kind of smoothing first?

 

Inductive Pickup Data

0 Kudos
Message 1 of 3
(3,052 Views)

I recently made some test with PulseMeas function used almost in real time: a continuous acquisition where I was reading samples with NSamples callback method; PulseMeas was used inside that callback on the part of the signal acquired. As you say, it gives a solid estimate of the frequency and it also returns the duty cycle of the signal. The worst thing is that you need to define all parameters to pass to the function even if you are not using them (*). I handn't time to made exhaustive tests and my signal was significantly different from yours but you may want to give it a look as it seems to me the simplest method you can think of to obtain your goal.

 

 

(*) There is a CVI Idea that you may want to give a kudo to that addresses this problem



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,011 Views)

 Run fast Furrier analisys function?

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