1
$\begingroup$

I was playing around with plotting DFT and realized that the negative frequencies are symmetric to the positive frequencies reflected at the nyquist.

enter image description here

  • Plot shown for the signal $f(x) = \cos(\frac{\pi}{2}x - \frac{\pi}{2}) + 2\cos(\pi x+ \frac{\pi}{2})$.

So why are the negative frequencies symmetrically distributed case for every DFT?

Possible approaches

  • I understand that the negative frequencies are required for the complete inverse DFT even though leaving them out will not change the result of the DFT though this does not explain the symmetry
  • Since for even $N$ the nyquiest is at $N/2$ the following should be true: $\exp(-\frac{j2 \pi n}{N}(\frac{N}{2}+1)) = \exp(-\frac{j2 \pi n}{N}(\frac{N}{2}-1))$

Looking at the statement above:
  • $\exp(-\frac{j2 \pi n}{N}(\frac{N}{2}+1)) = \exp(-j \pi n -\frac{j2 \pi n}{N}) = \exp(- j \pi n) \cdot \exp(-\frac{j2 \pi n}{N}) = [-1]^n \cdot \exp(-\frac{j2 \pi n}{N})$

should be equal to

  • $\exp(-\frac{j2 \pi n}{N}(\frac{N}{2}-1)) = \exp(-j \pi n + \frac{j2 \pi n}{N}) = \exp(- j \pi n) \cdot \exp(\frac{j2 \pi n}{N}) = [-1]^n \cdot \exp(\frac{j2 \pi n}{N})$
$\endgroup$

2 Answers 2

1
$\begingroup$

The DFT $X[k]$ of $x[n]$ is

$$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi nk/N}\tag{1}$$

If $x[n]$ is real-valued, the complex conjugate mirrored DFT coefficients are

$$\begin{align}X^*[N-k]&=\sum_{n=0}^{N-1}x[n]e^{j2\pi n(N-k)/N}\\&=\sum_{n=0}^{N-1}x[n]e^{j2\pi n}e^{-j2\pi nk/N}\\&=\sum_{n=0}^{N-1}x[n]e^{-j2\pi nk/N}\\&=X[k]\end{align}$$

So for real-valued $x[n]$, $X[k]=X^*[N-k]$ holds, i.e., all DFT bins $X[k]$ for $k>\lfloor N/2\rfloor$ are redundant.

This makes sense because we need only $N$ real-valued numbers to represent the $N$ (real) values $x[n]$, and the real and imaginary parts of a complex DFT coefficient represent two numbers. For complex-valued sequences $x[n]$, there is generally no redundancy in the DFT coefficients.

$\endgroup$
5
  • $\begingroup$ Why is it reasonable to use the complex conjugate of the complex sinusoids here? It kind of comes out of nowhere, I would like to have a little bit of intuition for this. I think the $[-1]^n$ in my approach could be seen why it is conjugated above $N/2$ $\endgroup$ Commented Jan 26, 2022 at 10:39
  • 1
    $\begingroup$ @OuttaSpaceTime: Well, you can just do it without the conjugate and derive what $X[N-k]$ is in terms of $X[k]$, and it'll turn out that it is $X^*[k]$, resulting in the same thing. $\endgroup$
    – Matt L.
    Commented Jan 26, 2022 at 10:51
  • $\begingroup$ @OuttaSpaceTime, to better understand where the conjugate comes from, try plotting the first complex term on the real/complex plane for $n=1$, $N=8$ and the first few non-DC frequencies $k=[1,2,3]$, that is: $e^{-j2\pi 1/8}$, $e^{-j2\pi 2/8}$, $e^{-j2\pi 3/8}$. Repeat for $k=N-[1,2,3]=[7, 6, 5]$. Note the conjugate symmetry. Where would the points lie if you selected $k=[-1, -2, -3]$, as if you were plotting the negative frequencies, just to the left of DC ($k=0$)? This should help see why the DFT of positive freqs. (e.g. $k=1$) have conjugate symmetry to negative freqs (e.g. $k=-1$). $\endgroup$
    – Ash
    Commented Jan 26, 2022 at 16:39
  • 1
    $\begingroup$ @OuttaSpaceTime, note that the $2\pi$ periodicity of the exponential causes the DFT to also have $2\pi$ periodicity. $e^{-j2\pi (-23)/8}=e^{-j2\pi (-15)/8}=e^{-j2\pi (-7)/8}=e^{-j2\pi 1/8}=e^{-j2\pi 9/8}=e^{-j2\pi 17/8}$ or $e^{-j2\pi k/N}=e^{-j2\pi (k+lN)/N}$ for any positive or negative integer of $l$. $\endgroup$
    – Ash
    Commented Jan 26, 2022 at 16:45
  • $\begingroup$ @Ash That was quite helpful, thanks! $\endgroup$ Commented Jan 26, 2022 at 20:50
0
$\begingroup$

I wrote my own DFT in C++ (plotted in python) and tested 7.5*cos(5*2πt)+2.5*cos(8*2πt) with a sample rate of 1000Hz and a 2 second duration. t is then the array([0., 0.001, 0.002, …, 1.999])

dft

Here are the spikes at 5,8 and at 992, 995…

Focusing on the 5Hz comp, I plotted two cosine waves (for my given sampling rate) at frequencies of 5 and 995. It was great to see they are the same! They both should then produce a spike. freq: 5 anf=d freq: 995

norm_time = np.array(range(len(t)))/len(t)
plt.scatter(t,np.exp(-2j*np.pi*10*norm_time).real)
plt.scatter(t,np.exp(-2j*np.pi*1990*norm_time).real,marker='.')
# In this ex the freq step is .5Hz, so coefficients 10 and 1990 are used to get freq 5 and 995. 

To me, the identical higher frequency wave is more like an aliasing effect and not the critical “negative” frequency it's referred to.

So instead of testing frequencies from 0-1000, I adjusted my DFT to test frequencies from -500 to 500.

dft from -500 to 500 Hz

Now we have spikes at 5 and -5 which look a lot more like some negative frequencies to me. Feels silly to even test this below, since of course they will align.

plt.scatter(t,np.exp(-2j*np.pi*10*norm_time).real)
plt.scatter(t,np.exp(-2j*np.pi*-10*norm_time).real,marker='.')

Just for good measure, here is my inv Fourier working on my -500 to 500 DFT and original signal.

inv Four

Maybe it is safe to say that the higher frequencies in a DFT are just aliased discrete waves that equal the negative frequencies (for a given sampling rate)

$\endgroup$
1

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.