Thursday, November 1, 2018

fft - Best method to extract phase shift between 2 sinosoids, from data provided


I have been asking around if the way I was extracting phase shift (lag) was correct, and I ran into some trouble.


So in general, given 2 arrays of data of the same length, representing:



  1. the input sinusoid and

  2. the response, also a sinusoid.



So not knowing the functions that produced the input (but knowing the frequency, starting phase of the input, fs, and so on), what is the best way to find the phase lag?



  • should I do it "manually" by looking at the graphs and finding the phase lag at each component?

  • should I use FFT, like I have been trying?


any suggestions, links, books are welcome.



Answer



You can use the cross-correlation function to determine the lag between the two signals.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...