Phase shifting a measured signal directly in time domain

Click For Summary
SUMMARY

The discussion centers on the performance issues encountered while performing phase shifting on a measured time domain signal consisting of approximately 1000 points using a Python algorithm. The user initially implemented a direct time domain approach, which was found to be slow, particularly when interpolating for non-integer time shifts. The community confirmed that using the Fast Fourier Transform (FFT) method is typically more efficient for phase shifting, and the user ultimately resolved their performance issue by correcting a mistake in their algorithm that unnecessarily increased the computational complexity.

PREREQUISITES
  • Understanding of time domain and frequency domain signal processing
  • Familiarity with Python programming and algorithm optimization
  • Knowledge of interpolation methods for signal processing
  • Experience with Fast Fourier Transform (FFT) techniques
NEXT STEPS
  • Research Python libraries for FFT, such as NumPy or SciPy
  • Learn about different interpolation methods for time-shifting signals
  • Explore optimization techniques for Python algorithms
  • Study the impact of computational complexity on algorithm performance
USEFUL FOR

Signal processing engineers, Python developers, and anyone involved in optimizing algorithms for time domain signal manipulation will benefit from this discussion.

vco
Messages
48
Reaction score
15
I need to perform a phase shift for a measured time domain signal. The signal consists of around 1000 points. I wrote an algorithm for this in Python a while ago and it seems to work as intended, but now I noticed that the algorithm is actually unexpectedly slow.

Is it so that phase shifting is usually performed by first transforming the signal into frequency domain and then back to time domain once the shifting has been done? My algorithm does the phase shifting directly in time domain; is this the probable reason for the poor performance?

Edit: In other words (and maybe more specifically) I mean time-delaying a periodic signal. My data consists of a single period of the signal.
 
Last edited:
Technology news on Phys.org
How can we answer without knowing your algorithm. Is it a bucket brigade?
 
  • Like
Likes   Reactions: pbuk
Are you conditioning the signal or messaging the data?
 
vco said:
Edit: In other words (and maybe more specifically) I mean time-delaying a periodic signal. My data consists of a single period of the signal.
This is still not very specific. Are you just shifting the data a fixed number of time steps in the array? If so, it should be very fast. Are you interpolating in some way to time-shift a non-integer amount of time steps? In that case, it might take a long execution time, depending on your interpolation method.
 
anorlunda said:
How can we answer without knowing your algorithm.
Quite right. :smile: I was just wondering whether the "direct" approach was known to be significantly worse in terms of performance compared to the apparently more common FFT approach.

hutchphd said:
Are you conditioning the signal or messaging the data?
The original signal will be used as input/reference for certain engineering calculations where the signal is time-delayed by various amounts according to other inputs.

FactChecker said:
This is still not very specific. Are you just shifting the data a fixed number of time steps in the array? If so, it should be very fast. Are you interpolating in some way to time-shift a non-integer amount of time steps? In that case, it might take a long execution time, depending on your interpolation method.
Non-integer amount of time steps.

Anyway, there was a silly mistake in my algorithm which increased the required number of operations by a factor of order n, where n is the number of points in the signal. All is good now. :smile:
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K