DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency input to Integer Output

Solved!
Go to solution

I am trying to identify a sine wave signal's frequency and convert it to an integer. Is it easier to measure it in the time domain or frequency domain? Whichever is easiest, what modules and functions do I need to use? Another engineer and I have gone around and around trying different approaches, but just can't find a working solution. As much help as you can give is appreciated.

 

Bill

0 Kudos
Message 1 of 3
(6,668 Views)
Solution
Accepted by topic author Williamx

Bill,

 

 

I can think of two ways:

 

For higher frequency sine waves -- use the FFT module. Then the Statistical Values module, in the "Max Position" mode will extract the frequency of the highest amplitude in the range.

 

For lower frequency sine waves, especially ones where the complete waveform is not within a single block, then you want to try the Pulse Analysis Module. For this to work, you need to change the Sine wave to a Pulse, using the trigger module.This assumes a clean sine wave, and turns it into a pulse by triggering when the value rises above 0. In simulation, this works well. I don't know how well it will work with real world data.

 

I've attached an example showing both techniques, and the results for each waveform frequency using FFT and Pulse Analysis. 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
Message 2 of 3
(6,662 Views)

Both methods look good. As it sometimes happens, my approach was subverted by the engineer driving the project.

 

Thanks for all your help!

Bill

0 Kudos
Message 3 of 3
(6,639 Views)