04-16-2012 06:27 PM
Dear All,
I am using Labview to monitor a research spark-ignition engine parameters (pressures/temperatures etc). I am using a rotary shaft encoder, connected to the camshaft, which sends out 1800 pulses per cycle (where each cycle is 720 crank angel (CA) degrees). These act as a trigger/external clock, and thus the data is recorded according to crank angle degree. I need to record it according to crank angle degree in order to do further analysis such as IMEP etc.
However in order to do some analysis, I need to apply a Bandpass filter on the pressure trace (between 4KHz and 9KHz). The parameters for the Butterworth filter are based on frequency (Hz) i.e time based, whereas my data has been recorded according to crank angle degree (where I have 1800 pressure data points per cycle). I was wondering is there a chance that my DAQ card records the data based on time even though I use an external clock as a trigger. And if yes is it possible to extract this time data so that I can build an array against my pressure trace.
( I know a way is to use the engine speed in RPM and work out the time but that speed is not very consistent!)
Any help would be greatly appreciated. I am attaching a screenshot of part of my program where I am acquiring the data and triggering it.
Regards,
04-17-2012 07:14 PM
1. What DAQ device are you using? I am unaware of any which record timestamps for each conversion, but there might be one somewhere.
2. How does a time domain or frequency domain filter relate to a crank angle domain dataset? Does that filtering even make any sense?
3. One possibility is to sample the shaft encoder as well as the pressure and temperature signals at a high enough rate that you can capture the encoder transitions, thus allowing generation of the crank angle domain data while also having uniformly sampled in time data for the filters.
Lynn
04-19-2012 05:37 PM
Thamk you for your reply.
1. I am using the PCIe-6351.
2. The time comes from the engine speed. The engine speed is 1200cycles/min thats is 20Hz (or 20 cycles per second). It is possible that I use this time scale and time the shaft encoder's 1800 pulses per cycle. One possibilty is use this to calculate the sampling frequency/cut off freq of filter in terms of per crank angle degree or otherwise which I am assuming you are mention in your point 3.
3. I am sampling at 36kHz (using the engine speed and shaft encoder pulse). But the issue with using the speed is that it is never constant which introduces an error. So I was wondering if I could use the onboard clock on the DAQ card somehow?
04-19-2012 06:37 PM
1. Your device can sample at 1 MS/s aggregate when sampling multiple channels. How many analog channels are you using?
2. and 3. I understand how you are using the encoder for crank angle to synchronize the conversions. The engine speed variations are what cause the error when you try to do time or frequency based analyses on the data.
You can use the internal DAQ clock which will give you data sampled uniformly in time so that your filters will work, but you lose the crank angle synchronization.
The reason I asked about the number of analog channels was to determine if you could time sample those plus the encoder fast enough to allow reconstruction of the crank angle data from the time data with sufficiently low errors.
Lynn
04-20-2012 11:42 AM
Here's what I would do:
1. Configure a counter task to do a buffered period or freq measurement on the same encoder signal.
2. For accuracy, I would personally set Units=Ticks and also explicitly configure a known internal
timebase such as 20 MHz.
3. Read the counter values as U32 counts
4. Keep track of a cumulative sum of these counts as a U64.
5. Divide this cumulative sum of counts array by your timebase freq to produce an array of timestamps
(in seconds) for every encoder edge.
6. Now you've got both measurement and time data and you can resample the measurement data for
equally-spaced time intervals.
7. Now you can more validly perform band-limited filtering.
-Kevin P