07-10-2013 07:55 AM
Hello,
I am trying to determine the phase shift between two sine waves of varying frequency.
Using the FFT function I am able to calculate the phase of each sine wave.
However I am uncertain how to calculate the phase shift between these two plots.
One of these plots is a generated sine wave with an increasing frequency between 0.2 and 5 Hz the other is a reaction to the command wave so it is a little erratic but does follow the commanded sine wave but with a lower amplitude.
Any ideas?
I am using DIAdem 2012
07-11-2013 02:52 PM
smoothdurban,
Since you have the phase information for both waves, you can just take the difference between the two for the phase shift. I believe the FFT function's phase output is a plot of phase vs frequency. So, with the difference, you can look at the phase shift at specific frequencies.
07-19-2013 05:38 PM
Hey Tim,
R&D responded with this excellent script for calculating the phase shift of two similar waveforms.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
08-13-2013 06:29 AM
Hey Brad
Looks good.
My only comment is I wish the comments were in english.
08-13-2013 10:38 AM - edited 08-13-2013 10:38 AM
Hi Tim,
Here's a version with English comments and a VIEW layout.
Brad Turpin
DIAdem Product Support Engineer
National Instruments