Discrete Fourier Series: What Happens After N/2?

1.2k Views Asked by At

I am really confused! I started to study Fourier series. I think I understand the theory approximately (I am still new to it). I was curious so started to read about DFT which I thought would be really basic to understand after the Fourier series but something completely confused me. I was having a look at this presentation from Paul Bourke. Which is a great document. But I got confused by this graph: enter image description here

I am very confused because I thought in fact the first harmonic (n=1) was indeed equal to $2 \pi \over N$, where N in the case of a discrete signal is the number of samples. So if N = 8, then the first harmonic looks likes this:

enter image description here

So this looks pretty logical to me but then I realised that you actually get to the Nyquist frequency when n (the harmonic = 4). In other words $\sin(4 * {2pi\over 8})$.

enter image description here

So I understand that normally you compute as many coefficients as samples in the signal. Thus you should have 8 coefficients and n should go from 0 to 8 (where the coefficient 0 is actually the DC component). However that means that when $n >= 5$ then our sine curve frequency is above the Nyquist limit and I can't really make sense of that. Furthermore when I look at the Bourke's diagram then he splits the figure for the DFT on the right in two at N/2. And he says frequencies on the left of this limit are positive and frequencies on the right are negative(f=-1/T, ...)? Finally he says that when the input signal is made of real numbers (imaginary part = 0), then the series on the left and right of this N/2 limit are symmetrical.

EDIT: in short 1) I don't understand why we compute coefficients above the Nyquist limit, 2) what are these negative frequencies that we get when $n >= N/2$.

I think I skipped an essential part of my understanding of Fourier series, and maybe it's because I haven't go to the discrete part yet, but it would be great if someone could put me on the right track if it's not too hard to explain. I felt I understood something about Fourier series and not I feel lost again.

Thank you so much.

1

There are 1 best solutions below

4
On BEST ANSWER

Say you have a sine wave of frequency $f$ in time: $x(t) = \sin (2\pi ft)$, and you perform sampling with sample rate $f_s$. This gives a discrete time wave $$x[n] = \sin\left(2\pi f \frac{n}{f_s}\right)$$

What happens when $f = 5$ and $f_s=8$ as original?$$x[n] = \sin\left(2\pi \frac{5}{8}n\right) = \sin\left(2\pi \frac{5}{8}n - 2\pi n\right) = \sin\left(-2\pi \frac{3}{8}n\right) = -\sin\left(2\pi \frac{3}{8}n\right)$$

And similarly for cosine: $$y[n] = \cos\left(2\pi \frac{5}{8}n\right) = \cos\left(2\pi \frac{5}{8}n - 2\pi n\right) = \cos\left(-2\pi \frac{3}{8}n\right) = \cos\left(2\pi \frac{3}{8}n\right)$$

So the problem here is that, if some frequency before sampling was above half of sampling rate, and if you perform sampling directly without filtering those out, all frequencies $\ldots, f-f_s, f, f+f_s, f+2f_s,\ldots$ will add together and there is no way to separate these out anymore.

From an alternative perspective, if there is a discrete time wave $x[n]$ as above, you can equally say the wave has a frequency of $f$ or any of $\ldots, f-f_s,f,f+f_s, \ldots$, since after sampling you have no way to tell what the original frequency is. Therefore, the frequency domain is in fact periodic every $f_s$, and it is sufficient to record any period of the frequency domain, for example in $\left(-\frac{f_s}2,\frac{f_s}2\right]$ or $[0,f_s)$.

If you view harmonics as $e^{i2\pi ft}$ instead of $\sin(2\pi ft)$ and $\cos(2\pi ft)$, where $i$ is the imaginary unit, then negative frequencies are for those harmonics with negative $f$. This uses the fact / definition that $$A\sin(2\pi ft) = A\cdot\frac{e^{i2\pi ft}-e^{-i2\pi ft}}{2i} = \frac{A}{2i}e^{i2\pi ft}-\frac{A}{2i}e^{-i2\pi ft}\\ A\cos(2\pi ft) = A\cdot\frac{e^{i2\pi ft}+e^{-i2\pi ft}}{2} = \frac{A}{2}e^{i2\pi ft}+\frac{A}{2}e^{-i2\pi ft}\\ $$