Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform shape affecting frequency count

To measure diesel engine rpm (over a 0-2500 rpm range) I've used a breakout box to splice into the position/timing inductive sensor on the flywheel.  
 
I can see the the pulse, y/t chart the waveform, get statistical and period/time data but not frequency - and it's frequency that's needed. 
At best, the output stays low (one to two) with random jumps to 7000 - 10000 Hz - not even close to correct. 
 
I'm using the frequency counter in the PWM module in DASYLab 7.00.05. 
 
When I first had this problem, I started bumping up the sampling rate - from 5 kHz to 10 and finally to 20 kHz. 
No improvement. 
 
The waveform itself is surprisingly triangular in shape - meaning the peak is very narrow and the in/out sides very symmetric - instead of flat-top as in conventional PWM. 
Does the shape/width of the waveform affect the accuracy of the PWM function?  If yes, is there another function/module that could be used to calculate frequency? 
 
Or is there another approach to solve this problem? 
 
Thanks,
 
Bob
0 Kudos
Message 1 of 4
(3,272 Views)
Hi Bob,

Are you using NI hardware to measure this signal?  Although I use Data Acquisition hardware from NI on a daily basis, I'm not very farmiliar with DASYLab.  If you have questions directly pertaining to DASYLab software, you can post on the dedicated DASYLab Forums.

On your analog input, make sure your sample rate is at least 10 times the highest frequency you wish to measure in order to get a good depiction of the signal's shape.  You mentioned that your engine will go up to 2500rpm, but I'm wondering how many pulses per revolution you are expecting.  For instance, if the motor produced 4 pulses per revolution, your maximum frequency would be 10kHz.  A 10kHz square wave sampled at 20kHz will look like a triangle wave.  Is it possible that this is the behavior you're seeing?

Thanks, Bob.  Let me know if there is more I can do to help out.

Have a great day!
Travis W
0 Kudos
Message 2 of 4
(3,251 Views)

You may need signal conditioning hardware to square up the the triangular pulse into a square wave for accurate frequency data.

But you state that you get accurate period data. If so, it's as simple as Frequency = 1 / Period.

(i.e. if period is 0.001 second, then frequency = 1 / 0.001 = 1000 Hz.)

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 4
(3,236 Views)
Thank you both, Travis and Analog Kid. 
 
This is very good feedback and your voice is appreciated. 
 
Travis, my frequency range of interest is up to 1kHz. 
But it looks like I'm seeing 12 or 16 pulses per revolution.  At 2500 rpm engine speed, this means 40 kHz pulses per rev.  At 10 times oversample, this is 400 khz per channel - and I need eight channels. 
 
This gets to be a lot of data and my DAQ hardware is capable of 1 mHz aggregate sampling rate maximum. 
I'm considering fewer channels and/or multiple tests and I'll come up with a working solution. 
 
Analogue Kid, I'm looking how to filter this into a flattop waveform.  Any suggestions on how? 
Also, with the counter information in blocks, I'll look to generate a samples per block and convert that to seconds then generate a running count to period to frequency conversion. 
 
Thank you both and I will continue to plug away at this. 
 
Respectfully,
 
Bob
0 Kudos
Message 4 of 4
(3,211 Views)