0
$\begingroup$
my_signal = 8192*cos(2*pi*6*(0:7)/8) + 1i* 8192*sin(2*pi*6*(0:7)/8);

my_signal_fft = fft(my_signal);

plot(abs(my_signal_fft));

This is matlab code. What do you notice about the spectrum? Is it symmetrical? Obviously not, because I think it has an imaginary part. Would you enlighten me for the analysis of this signal's spectrum and why having an imaginary part doesn't make it symmetrical? How is the other half gone?

$\endgroup$
1
  • $\begingroup$ There are a lot of questions here. Would it be correct to summarize by asking "Why does an imaginary component result in an asymmetrical spectrum?" $\endgroup$
    – David K
    Commented May 13, 2014 at 12:35

1 Answer 1

0
$\begingroup$

Your signal has the form

$$x(n)=A[\cos(2\pi fn)+i\sin(2\pi fn)]=Ae^{i2\pi fn}$$

This is a complex exponential with normalized frequency $f$ (normalized by the sampling frequency). The bins of the signal's FFT of length $N$ correspond to normalized frequencies

$$f_i=\frac{i-1}{N},\quad i=1,2,\ldots, N$$

In your case $N=8$ and $f=6/8=f_7$ (using the Matlab indexation, which starts with index $1$). So the frequency of your signal $x(n)$ lies exactly on the FFT grid. This is why there is one peak at index $7$ and all other values are $0$ (apart from numerical inaccuracies).

If $x(n)$ were real-valued, its FFT would satisfy the following symmetry condition:

$$X_k=X^*_{N-k}$$

However, for complex-valued signals, such as yours, there is in general no symmetry.

$\endgroup$
6
  • $\begingroup$ I'm sorry I'm a noob in dsp yet, can you please elaborate "The bins of the signal" and "So the frequency of your signal x(n) lies exactly on the FFT grid." where else it can lie, what is meant with FFT grid? $\endgroup$
    – Anarkie
    Commented May 13, 2014 at 12:53
  • $\begingroup$ @Anarkie: The bins of the FFT are simply the values of the FFT. You have 8 bins and each bin corresponds to a certain frequency given by the formula in my answer. The frequency of your complex exponential could be anywhere between two bins, but it so happens that it exactly corresponds to one of the bin frequencies. So you see exactly one nice peak at this particular FFT bin. $\endgroup$
    – Matt L.
    Commented May 13, 2014 at 12:55
  • $\begingroup$ @Anarkie: Refer to: Understanding FFT bin resolution, and: Explanation of binning in frequency analysis post-FFT, and Why does spectral leakage arise in an FFT?. $\endgroup$
    – jojeck
    Commented May 13, 2014 at 12:56
  • $\begingroup$ @MattL. Sorry for the late response, I understand fi calculation but just don't understand why the peak is at 6/8 index 7, why not 2/8, why not 5/8? $\endgroup$
    – Anarkie
    Commented May 25, 2014 at 19:43
  • $\begingroup$ @Anarkie: Simply because in the argument of your sine and cosine functions you have 2*pi*(0:7)*6/8, so 6/8 is the relative frequency. And because Matlab's indices start with 1, not with 0, the corresponding FFT index is not 6 but 7. $\endgroup$
    – Matt L.
    Commented May 25, 2014 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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