Phase shifting a measured signal directly in time domain

Click For Summary

Discussion Overview

The discussion revolves around the performance of an algorithm for phase shifting a measured time domain signal, specifically focusing on whether this process is typically more efficient when performed in the frequency domain using FFT (Fast Fourier Transform) compared to a direct time domain approach. The context includes considerations of algorithm efficiency and the nature of the signal being processed.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant notes that their algorithm for phase shifting in the time domain is unexpectedly slow and questions if this is due to the direct approach rather than using FFT.
  • Another participant asks for clarification on the algorithm's specifics, suggesting that knowing the algorithm is essential for providing a meaningful answer.
  • There is a question about whether the signal is being conditioned or if the data is being messaged, indicating a need for clarity on the processing method.
  • Participants inquire if the phase shifting involves a fixed number of time steps or if interpolation is used for non-integer time shifts, which could affect performance.
  • The original poster later identifies a mistake in their algorithm that significantly increased the number of operations required, suggesting that this was a primary factor in the poor performance.

Areas of Agreement / Disagreement

Participants express uncertainty about the performance implications of the direct time domain approach versus the FFT method. There is no consensus on the efficiency of the different methods, as the discussion includes varying perspectives on algorithm specifics and performance factors.

Contextual Notes

The discussion highlights limitations in understanding the algorithm's structure and the specific methods used for phase shifting, which may affect performance outcomes. The mention of a mistake in the algorithm suggests that performance issues may not solely be attributed to the chosen method of phase shifting.

Who May Find This Useful

This discussion may be of interest to individuals working on signal processing, particularly those exploring different methods for phase shifting in time and frequency domains, as well as those developing algorithms in Python for similar applications.

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
4K
  • · Replies 6 ·
Replies
6
Views
3K