Skip to main content
small typos
Source Link
lennon310
  • 3.6k
  • 19
  • 25
  • 27

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this will not work. Spectral analysis using an FFT is quite complicated. Look for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have two sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this will not work. Spectral analysis using an FFT is quite complicated. Look for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have two sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this will not work. Spectral analysis using an FFT is quite complicated. Look for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have two sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this iswill not going to work. Spectral analysis using an FFT is quite complicated. LooksLook for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have totwo sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this is not going to work. Spectral analysis using an FFT is quite complicated. Looks for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have to sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this will not work. Spectral analysis using an FFT is quite complicated. Look for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have two sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

added 14 characters in body
Source Link

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this is not going to work. Spectral analysis using an FFT is quite complicated. Looks for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have to sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1), x_2(t) = A_2\cos(\omega_0+\phi_2)$$$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{<y(t)>}{A_1A_2}\right)$$$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this is not going to work. Spectral analysis using an FFT is quite complicated. Looks for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have to sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1), x_2(t) = A_2\cos(\omega_0+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{<y(t)>}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Unless your sine wave frequency is an integer multiple of your frequency resolution (sample rate divided by FFT length), this is not going to work. Spectral analysis using an FFT is quite complicated. Looks for "spectral leakage" on this forum (or Google it) for more explanations.

You don't need an FFT to determine the phase difference. Let's say you have to sine waves

$$x_1(t) = A_1\cos(\omega_0t+\phi_1) \\x_2(t) = A_2\cos(\omega_0t+\phi_2)$$

If you multiply them, you get

$$y(t) = x_1(t) \cdot x_2(t) = A_1A_2\cos(\omega_0t+\phi_1)\cos(\omega_0t+\phi_2) $$

Using a trigonometric identity we get

$$y(t) = \frac{1}{2}\left[\cos(2\omega_0 t+\phi_1+\phi_2)+\cos(\phi_1-\phi_2) \right]$$

There is a constant offset that's a function of the phase difference, i.e. you can get the difference from the mean of the multiplied signal,

$$ \phi_1-\phi_2 = \cos^{-1}\left(\frac{\langle y(t) \rangle}{A_1A_2}\right)$$

For only 8 points you may get some numerical noise, but that depends a bit on your details and the sample rate.

Source Link
Hilmar
  • 48.2k
  • 1
  • 32
  • 67
Loading