×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

time synchronous averaging
3

time synchronous averaging

time synchronous averaging

(OP)
Hello,

I am trying to write a program for time synchronous averaging of a signal in Matlab.
I am having a little trouble where to start as I have limited experience with this type of work.
The work is for a machine running a gearbox. The signal I am collecting is from the gearbox itself.
Does anyone have experience with this? Maybe just to start me off on the right foot.
Any input would be greatly appreciated.
Thanks,

 

Fe

RE: time synchronous averaging

Process/loop running:
y = (x(n-1)+x(n))/2

RE: time synchronous averaging

(OP)
Thanks. Simple enough. I will give it a try.
thumbsup2

Fe

RE: time synchronous averaging

(OP)
My only concern is with the processing time of the loop.
I have more then 500,000 data points to process.
Is there a more efficient algorithm?

Fe

RE: time synchronous averaging

So are you running this on recorded data or are you trying to run this while you acquire the signal data?  If you are running this on recorded data I don't know of any other averaging algorithm other than that.  On a decent machine running matlab that should take a few seconds on recorded data.  If your acquiring data and averaging it in real-time this algorithm is lightning fast.

If you have the data already "I would"...
y=zeros(1,length(sig_dat));
for i=1:length(sig_dat)-1
    y(i)=(sig_dat(i)+sig_dat(i+1))/2
end

RE: time synchronous averaging

(OP)
Thanks again.
I am not working it in real time for now so the signal is collected beforehand then analyzed.
I understand that your proposed algorithm does average the signal over 2 data points which works well and pretty fast.
Also, I have another goal for this algorithm.
I am trying to synchronize the vibration signal of the gearbox with that of the speed of the shaft in such a way that any signals that have a higher frequency then that of the speed of the shaft are filtered out. This would enable to to analyze the signal further for faults in the machinery.
Is there a general method possibly?

 

Fe

RE: time synchronous averaging

Well this would require some sort of spectral analysis on that data so you can pick out the harmonic of the gearbox, which may or may not be composed of several sub-harmonics.  You could run the data through an FFT and plot it.  Try looking through the matlab docs at FFT for examples on how to do this but here is a short example:

f=250;
t=linspace(0,1,1024);
y=randn(1,1024)+sin(2*pi*f.*t);
plot(abs(fft(y)))

RE: time synchronous averaging

Are you asking about "periodic averaging", whereby a waveform that is periodic is averaged from many captures of this segment of waveform to create an noise reduced picture of "one cycle" of the waveform??

If so capture a long segment with 5-10 cycles.
use

cross=xcorr(sequence,sequence)

If the waveform is periodic there should be a peak on the cross correlation waveform indicating the shift, or cycle length.

If you get hear then break up into segments of this length and average them together.



 

RE: time synchronous averaging

(OP)
Thanks.

ptengineer-

I am using FFT also. Although, I hope run this algorithm before the FFT.

2dye4-

Your periodic averaging description is pretty much what I am trying to achieve.
I ran the xcorr m-file and my results are attached. I am not sure what to do from here though. There is peak in the center.
How could I break it up as you say and average them together?
 

Fe

RE: time synchronous averaging

Fex32
The peak at around delay 10000 tends to indicate a periodicity of 10000 samples in the fundamental period.

So averaging segments of 10000 may be productive.

If it were all in a matlab row vector use RESHAPE command to put the segments into rows and then average each column as a sample point.

 

RE: time synchronous averaging

(OP)
Thanks for all the replies. The TSA does work sufficiently well now.
Thanks for the link sreid. I will consider outsourced equipment if my results are not what I expect.
all the best,

Fe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources