0
$\begingroup$

My question is related to this article: https://www.dsprelated.com/showarticle/192.php

I think I understand mostly everything until this sentence:

"The directions in which the impulses are pointing show the relative phases of the spectral components".

Please, note that I understand (and tested in Matlab) that the DFT of a pure sine wave of frequency f has a negative peak at the positive freq f and a positive peak at freq -f in the imaginary part Im(fft(x)) and no peaks in Re(fft(x)). Cosine has only positive peaks in Re(.) and nothing in Im(.) etc.

However, I have trouble understanding this story about phases, can someone help me understand this sentence:

"The directions in which the impulses are pointing show the relative phases of the spectral components".

$\endgroup$
0
$\begingroup$

This is basically just about the phase of a complex number. If you have a sinusoid

$$x(t)=\cos(\omega_0t+\phi)\tag{1}$$

then it can be written in terms of complex exponentials:

$$x(t)=\frac{e^{j\omega_0t}e^{j\phi}+e^{-j\omega_0t}e^{-j\phi}}{2}\tag{2}$$

So the signal has two components, one spectral line at frequency $\omega_0$ with phase $\phi$, and another spectral line at $-\omega_0$ with phase $-\phi$.

Note that if you had a pure cosine, i.e., if $\phi=0$ in $(1)$ then you would get two spectral lines with a real-valued and positive weight. If you had a pure sinusoid, i.e., $\phi=-\pi/2$ in $(1)$, then you would get two purely imaginary weights with opposite signs. These are the two special cases that you've already figured out by yourself.

$\endgroup$
  • $\begingroup$ In DFT, when referring to phase, we always say phase relative to the cosine wave of the real part yes? E.g. -pi/2 and pi/2 for the 2 complex weights fot the DFT of a sine wave. Correct.? $\endgroup$ – Machupicchu Jul 29 '19 at 21:05
  • $\begingroup$ @Machupicchu: Yes, simply because $\cos(x)=\frac12 (e^{jx}+e^{-jx})$. $\endgroup$ – Matt L. Jul 29 '19 at 21:15
  • $\begingroup$ Sorry but why "because" of this equality? I can imagine another "reference" could be used. Is it not arbitrary?(sorry if the question is a bit strange) $\endgroup$ – Machupicchu Jul 29 '19 at 22:01
  • $\begingroup$ @Machupicchu: Because you see that there are no complex weights (other than $1$) in the definition of the cosine. For the sine you need to divide by $j$, and the second term gets a negative sign. $\endgroup$ – Matt L. Jul 29 '19 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.