Skip to content

D-Raus/pyTSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

The Matlab function 'tsa' allows to compute the phase-average of a signal with varying cycles length.

As an avid user of this Matlab function, I was frustrated not to find an equivalent with Python.

Algorithms

Time-domain method (pyTSA_TimeDomain function):

  1. Divide the signal into segments corresponding to the different cycles
  2. Interpolate the signals in each segment on the same number of samples
  3. Compute the average of all the resampled segments

Frequency-domain method (py_TSA_fft function):

  1. Divide the signal into segments corresponding to the different cycles
  2. Compute the fft of each segment
  3. Truncate the results on each segment so that all fft have the same length as the one of the shortest cycle
  4. Average all the spectra
  5. Compute the inverse fft to obtain the phase-averaged signal in the time domain.

Example

The code 'pyTSA_example.py' presents an example of use of the TSA algorithms for the computation of the time-synchronous average of the position of a fan blade as it slows down after switchoff. This example is inspired by the Matlab example presented in the 'tsa' function help page.

The scipy.signal 'find_peaks' is first used to detect the beginning of each cycle: blade position

The pyTSA module is then tested to compute the phase-averaged position of the the fan blade during one cycle: blade position phase average

Reference

Bechhoefer, Eric, and Michael Kingsley. "A Review of Time-Synchronous Average Algorithms." Proceedings of the Annual Conference of the Prognostics and Health Management Society, San Diego, CA, September-October, 2009.

About

Time-synchronous average (or phase-average) of a signal using Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages