04-29-2010 01:02 AM
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
Solved! Go to Solution.
04-29-2010 08:20 AM
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.
04-30-2010 03:39 PM
Both methods look good. As it sometimes happens, my approach was subverted by the engineer driving the project.
Thanks for all your help!
Bill