I have a time domain signal that corresponds to a vibration signal of a machine. I have a second signal that corresponds to a tachometer signal (There is a pulse every one revolution of the shaft). I'd like to use time synchronous averaging under MATLAB. I'd like to take all blocks of time from the time domain signal whose durations is the duration of one revolution of the signal and average them out. The problem I have is that the speed of the shaft is slightly fluctuating. I've set it to 900RPM but it goes from 895RPM to 904RPM during the acquisition and so the duration of one revolution fluctuates as well (some miliseconds). My question is would averaging blocks of signals of different durations be a problem? And if so, how should I deal with this?
The answer to your question "is it a problem" is really up to you to determine. Sometimes the simple things work well enough.
There is a technique called Dynamic Time Warping:
and Matlab has a function dtw
which can use to figure out if it is a problem.
I suggest you pick a reference interval, that would be the closest to the average shaft interval and use that to warp the rest against.
In this type of problem the common approach is to resample the data from the time domain to the angle domain. The steps involved are:
- Use the tachometer signal to obtain a speed signal. This is the inverse of the difference in time for each trigger point.
- Depending upon the variability of the tachometer signal least squares cubic spline fitting is often used. Matlab spline library will work as will matlab central libraries. I use the fastBspline library.
- Integrate the speed signal to obtain shaft angle position.
- Determine the equal angle increments that you want to use. Keep the Nyquist theorum in mind, in other words there should be roughly the same number of points in the angle domain as in the time domain.
- Switch the (time, angle) data to (angle, time).
- Resample the (angle, time) data to obtain uniform angle increments.
Once this is done, do all the same processing you would have done, but now you are in the angle order domain.
Why not using the
tsa in Matlab ?
You sample your data at fixed sampling rate in time?
However, the time delay between 2 revolutions is not constant as you mentionned your RPM is not constant.
If you split the data in blocks that correspond to one revolution, your blocks won't have the same length in time.