3

I'm stuck with the following exercise while self-studying the Discrete Fourier Transform:

Consider sampling exactly three cycles of a continuous $x(t)$ sinusoid resulting in an 8-point $x(n)$ time sequence whose 8-point DFT is the $X(m)$ shown in figure below. If the sample rate used to obtain $x(n)$ was 4000 Hz, write the time-domain equation for the discrete $x(n)$ sinusoid in trigonometric form. Show how you arrived at your answer

Real and Imaginary part of the DFT

From $f_{analysis}(m) = {{fs}\cdot{m}\over{N}} $, I know the "bins" 0 to 7 on the graphics are corresponding to the frequencies in Hz:

$$ \{ 0,500,1000,\boldsymbol{1500},2000,\boldsymbol{2500},3000,3500 \}$$

where the values in bold are corresponding to the non-zero terms.

I also feel like $x(t)$ is of the form:

$$x(t) = A_0\left(cos\left({2\pi}{1500}t\right)+sin\left({2\pi}2500{t}\right)\right)$$

But, (1) I'm not sure my intuition is right (2) I don't know how to prove it (3) I don't see how to calculate the amplitude $A_0$ (4) and finally, is finding $x(t)$ really the answer to the question of writing "the time-domain equation for the discrete () sinusoid in trigonometric form"

Sylvain Leroux
  • 315
  • 2
  • 19
  • Take a look at: https://dsp.stackexchange.com/questions/59305/using-fourier-coefficients-to-reconstruct-data-in-matlab/59306#59306 – Cedron Dawg Dec 12 '19 at 19:57
  • The normalization of the DFT and the inverse DFT is a matter of choice. The most common convention is "1" for the forward and "1/N" for the reverse. This is the reverse of my preference, but I assumed your question was the common convention hence the "1/N" in my inverse DFT definition starting my answer. Mathematically, $1/ \sqrt{N}$ makes the DFT and its inverse unitary operations, but nobody does that. – Cedron Dawg Dec 12 '19 at 23:49

3 Answers3

4

(1) I'm not sure my intuition is right

Almost, but you're missing the fact that if you're sampling at 4000kHz, the signals alias; after sampling at 4000kHz, a sine wave at 1500Hz is indistinguishable from one at 2500Hz or 5500Hz, etc. Also, because the work is being done in complex numbers, negative frequencies have meaning: $e^{-j \omega t}$ is different from $e^{j \omega t}$

(2) I don't know how to prove it

Go back and study the Fourier Transform more. You want the Euler identity tattooed onto your frontal lobes: $e^{j \theta} = \cos \theta + j \sin \theta$. You also want the two offshoots of that: $$\cos \theta = \frac{e^{j \theta} + e^{-j \theta}}{2}$$ and $$\sin \theta = \frac{e^{j \theta} - e^{-j \theta}}{j2}$$

prove these to yourself. It'll help you out immensely later.

So (after you review the Fourier transform) you have a signal with a real part and an imaginary part: $$\sqrt{32} \left ( e^{j 2 \pi \frac{3}{8}n} + e^{j 2 \pi \frac{5}{8}n} \right) - j\sqrt{32} \left ( e^{j 2 \pi \frac{3}{8}n} - e^{j 2 \pi \frac{5}{8}n} \right)$$ Note that $2 \pi \frac{5}{8} n = 2 \pi (1 - \frac{3}{8}) n$ and recall that $e^{j 2\pi + \theta} = e^{j \theta}$; after some clever trig identities do these look like anything I've just shown you?

(3) I don't see how to calculate the amplitude A0

It should drop out of the calculations above.

(4) and finally, is finding x(t) really the answer to the question of writing "the time-domain equation for the discrete () sinusoid in trigonometric form"

Yes, but mind your aliasing!

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
TimWescott
  • 12,704
  • 1
  • 11
  • 25
4

Here's the pure math:

$$ x[n] = \frac{1}{N} \sum_{k=0}^{N-1} X[k] e^{i \frac{2\pi}{N} nk } $$

$$ x[n] = \frac{1}{8} \left[ (5.657 + i 5.657) e^{i \frac{2\pi}{8} n 3 } +(5.657 - i 5.657) e^{i \frac{2\pi}{8} n 5 } \right] $$

$$ e^{i \frac{2\pi}{8} n 5 } = e^{-i \frac{2\pi}{8} n 3 } $$

$$ \begin{aligned} x[n] &= \frac{1}{8} \left[ (5.657 + i 5.657) e^{i \frac{3\pi}{4} n } + (5.657 - i 5.657) e^{-i \frac{3\pi}{4} n } \right] \\ &= \frac{1}{8} \left[ 5.657 \left( e^{i \frac{3\pi}{4} n } + e^{-i \frac{3\pi}{4} n } \right) + i 5.657 \left( e^{i \frac{3\pi}{4} n } - e^{-i \frac{3\pi}{4} n } \right) \right] \\ &= \frac{1}{8} \left[ 5.657 \left( 2 \cos \left( \frac{3\pi}{4} n \right) \right) + i 5.657 \left( 2i \sin \left( \frac{3\pi}{4} n \right) \right) \right] \\ &= \frac{5.657}{4} \left[ \cos \left( \frac{3\pi}{4} n \right) - \sin \left( \frac{3\pi}{4} n \right) \right] \\ &= \frac{5.657}{4} \sqrt{2} \left[ \frac{1}{\sqrt{2}} \cos \left( \frac{3\pi}{4} n \right) - \frac{1}{\sqrt{2}} \sin \left( \frac{3\pi}{4} n \right) \right] \\ &\approx 2 \left[ \cos\left( \frac{\pi}{4} \right) \cos \left( \frac{3\pi}{4} n \right) - \sin\left( \frac{\pi}{4} \right) \sin \left( \frac{3\pi}{4} n \right) \right] \\ &= 2 \cos\left( \frac{3\pi}{4} n +\frac{\pi}{4} \right) \\ \end{aligned} $$

$$ t = \frac{n}{4000} $$

$$ n = 4000 t $$

$$ \begin{aligned} x(t) &= 2 \cos\left( \frac{3\pi}{4} 4000t +\frac{\pi}{4} \right) \\ &= 2 \cos\left( 3000 \pi t +\frac{\pi}{4} \right) \\ &= 2 \cos\left( 1500 \cdot 2 \pi t +\frac{\pi}{4} \right) \\ \end{aligned} $$

Alternatively:

$$ \begin{aligned} x[n] &= \frac{5.657}{4} \sqrt{2} \left[ \frac{1}{\sqrt{2}} \cos \left( \frac{3\pi}{4} n \right) - \frac{1}{\sqrt{2}} \sin \left( \frac{3\pi}{4} n \right) \right] \\ &\approx 2 \left[ \sin\left( \frac{\pi}{4} \right) \cos \left( \frac{3\pi}{4} n \right) - \cos\left( \frac{\pi}{4} \right) \sin \left( \frac{3\pi}{4} n \right) \right] \\ &= 2 \sin\left( \frac{\pi}{4} - \frac{3\pi}{4} n \right) \\ &= -2 \sin\left( \frac{3\pi}{4} n - \frac{\pi}{4} \right) \\ &= 2 \sin\left( \frac{3\pi}{4} n - \frac{\pi}{4} + \pi \right) \\ &= 2 \sin\left( \frac{3\pi}{4} n + \frac{3\pi}{4} \right) \\ \end{aligned} $$


Thanks for the check mark. Here is a little more since this is such an important topic.

That was the pure math approach. You can also do it more conceptually with a few rules about how the DFT works.

First, you have 8 bins, so bin 4 is your Nyquist bin. In this problem, its value is zero. Had it not been, this would have been a more interesting problem. (Dig into the detail of this exchange to find out: How to get Fourier coefficients to draw any shape using DFT? )

Your DC bin is also zero.

For any real valued signal, the DC and Nyquist bins have to have zero imaginary component, and the upper half of the DFT is the complex conjugate mirror of the lower half. This is known as Hermitian symmetry.

$$ X[k] = X^*[N-k] $$

You can add any multiple of N to either index due to the periodicity of the DFT.

The values in your problem fit these criteria so you know you are looking at a real valued signal and only the lower half is significant.

The only non-zero bin value in the lower half is at 3. This means you have either 3 cycles per frame, or 5 cycles per frame (an alias), or any number 3+N or 5+N cycles per frame (more aliases). The problem specifies that there are three cycles per frame so this ambiguity is resolved.

The other big thing to know about a DFT is that a pure tone with a whole number of cycles per frame (k) will land in a single bin with the corresponding index.

If you signal is:

$$ x[n] = A \cos \left( \left[\frac{2\pi}{N}k \right] n + \phi \right) $$

where $ 0 < k < N/2 $

From this definition you can see the argument of the cosine function advances $\frac{2\pi}{N}k$ radians for every sample. For every $N$ samples, $k$ cycles ( $2\pi k$ radians) are completed.

There will be two non-zero bin values in the conventionally unnormalized DFT:

$$ X[k] = N \frac{A}{2} e^{i \phi} $$

and

$$ X[N-k] = N \frac{A}{2} e^{-i \phi} $$

Looking at just the kth bin:

$$ | X[k] | = N \frac{A}{2} $$

$$ \arg( X[k] ) = \phi $$

In your case:

$$ X[3] = 5.657 + i 5.657 $$

$$ |X[3]| = |5.657 + i 5.657| = 5.657\sqrt{2} = 8 \frac{A}{2} $$

$$ A = \frac{5.657\sqrt{2}}{4} \approx 2 $$

$$ \phi = \arg( X[3] ) = \arg(5.657 + i 5.657) = \operatorname{atan2}(5.657, 5.657) = \frac{\pi}{4} $$

Note $ \arg(x + i y) = \operatorname{atan2}(y, x) $

You can now plug these values into the signal definition:

$$ \begin{aligned} x[n] &= 2 \cos \left( \left[\frac{2\pi}{8}3 \right] n + \frac{\pi}{4} \right) \\ &= 2 \cos \left( \frac{3\pi}{4} n + \frac{\pi}{4} \right) \\ \end{aligned} $$

Notice that the DFT doesn't care about the sampling rate. That only comes in as a factor to convert your frequency from cycles per frame to cycles per unit dimension, usually seconds of time.

$$ \frac{3\pi}{4} \frac{radians}{sample} \cdot \frac{1}{2\pi} \frac{cycles}{radian} \cdot 4000 \frac{samples}{second} = 1500 \frac{cycles}{second} $$

Notice that the frequency conversion from radians per sample to cycles per second is independent of the DFT frame size.

Or you could have just plugged in $ n = 4000t$ like above.



In response to Dan's last comment under his answer (and food for thought for the OP):

"What it is" (definition) and "How you see it" (interpretation) are two different things. Yes, a FIR filter is a dot product. The result of the dot product is the output signal, making it a filter. For your DFT comparison, you added two elements, a shifting frame and an inverse DFT. Together they may function like a filter, but by definition, the DFT itself is not, and not identical to a FIR filter. Another way to put it, the output of a FIR is in the time domain and the output of the DFT is in the frequency domain (interpretations) even though the mathematical operations are identical (definitionally dot products).

The center-of-mass, aka centroid, interpretation sees the DFT as a weighted average calculation, where a set of Roots of Unity are being averaged and the weighting is the signal. It is a strong argument for a 1/N normalization factor. Spectral leakage is also very well understood in this model, check out the charts in the article.

The DFT can be interpreted through many different lenses, the Linear Algebra transformation probably being the most mathematically meaningful one. Obviously you don't have to know Linear Algebra to understand how the DFT behaves.

The DFT can definitely be seen as a bank, or array, of correlation measurements, using the engineering definition of correlation. Whereas, the math/stats definition is normalized giving a result of one when two signals are completely correlated. The existence of the engineering definition is something I learned here on DSP.SE, and something I think should have been given a different name.

One interpretation does not void another. It is just a different way of looking at the same thing.

P.S. There is a neat trick for calculating a one sample sliding DFT without having to recalculate it each time. I'm pretty sure Lyons wrote an article on it, I'd have to look.


To give some clarification to the distinctions of interpretation I am trying to highlight:

To see the DFT as a special case in a typical Linear Algerbra system of equations solution, take a look at my answer for:

Is there any algorithm to decompose a wave into a set of given frequencies?

This is nearly unrecognizable as being the same mathematical defintion (with a $1/N$ normalization) of the center of mass interpretation.

Here is Figure 12 from my Centroids article:

Figure showing DFT as polar graphs

This is very similar to the OP's case, being a pure real tone with exactly three cycles in the frame. The differences are the number of sample points, the amplitude, and a slight difference in the phase.

The graph of the figure is shown at the top. Notice the color gradient goes from green to red. The six polar graphs at the bottom represent bins zero (DC) through five. The graphs are produced by stretching the signal by a factor of the bin index and then wrapping them around the circle, aka polar graphing with different step sizes.

Which one of these is different from the others? The DC, of course, With a step size of zero, the signal stays on the real axis, and it can clearly be seen that the center of mass will also be on the real axis. In this case, at zero.

Actually, you can also say that bin 3 (the fourth graph) is also the different one, because it is the only one for which the center of mass (Centroid) is not zero. In fact it is $1/2$. Just as striking, the center of mass is located at one radian, just like the phase value in the definition.

Coincidence? I think not. Just a really cool different way to understand the DFT.

Does any one want to claim that these two interpretations resemble each other in any way? Does anybody think either is incorrect?

Nope, me neither.

As for the "filter bank" interpretation, some one else will have to justify that, as I've already said, I consider it very misleading, if not outright incorrect. Then again, perhaps I've never seen a proper explanation.

Cedron Dawg
  • 7,560
  • 2
  • 9
  • 24
  • For your second line $$ e^{i \frac{2\pi}{8} n 5 } = -e^{-i \frac{2\pi}{8} n 3 } $$ – Dan Boschen Dec 12 '19 at 22:44
  • @DanBoschen I disagree:

    $$ e^{i \frac{2\pi}{8} n 5 } e^{-i 2\pi n} = e^{i \frac{2\pi}{8} n (5-8) } = e^{-i \frac{2\pi}{8} n 3 } $$Five eights around the circle is the same as negative three eights.

    – Cedron Dawg Dec 12 '19 at 22:48
  • Yes I see! Then I have a sign error. – Dan Boschen Dec 12 '19 at 22:56
  • @DanBoschen No worries. If you haven't seen my first blog article, I highly recommend it: https://www.dsprelated.com/showarticle/754.php – Cedron Dawg Dec 12 '19 at 22:58
  • Ok- no sign error (in my answer I meant, which made me think your e sign was wrong) - your final result is cosine and mine is sine so I believe they match. Tim then has a sign error which I will fix and then we all match. – Dan Boschen Dec 12 '19 at 23:00
  • @DanBoschen Yeah, but I got it right first. ;-) I do prefer $\cos$ for signal definitions (see the rest of my real pure tone blog articles). Correction, yours is still off by a negative one factor. Plug in $t=0$. – Cedron Dawg Dec 12 '19 at 23:11
  • right! All good now. – Dan Boschen Dec 12 '19 at 23:19
  • @Cedron, I just see your edit. You wrote exactly what I needed for the different pieces to fit together. Thank you very much for those detailed explanations! – Sylvain Leroux Dec 14 '19 at 11:17
  • 1
    @SylvainLeroux You're welcome. Next steps: I recommend that you follow the reference I included and the discussion about RB-J's assertion that the Nyquist bin "has to be split". I learned a lot from it and Olli's followup question. It should be, doesn't have to be. Check out my answer in https://dsp.stackexchange.com/questions/59305/using-fourier-coefficients-to-reconstruct-data-in-matlab for the real valued case. Also, my article https://www.dsprelated.com/showarticle/771.php will give you true simplified equations for "leakage". My first four articles are most pertinent. – Cedron Dawg Dec 14 '19 at 12:56
  • I surely will (I don't know how I would find the time--but I will). As a side note, since you write for dsprelated.com you may know another author: Rick Lyons. This exercise was from his book. – Sylvain Leroux Dec 14 '19 at 15:30
  • 1
    @SylvainLeroux I have corresponded with Rick on occasion. He is a stand up guy with a solid reputation of being able to explain DSP concepts well. He also has a presence here at DSP.SE, https://dsp.stackexchange.com/users/15391/richard-lyons. – Cedron Dawg Dec 14 '19 at 15:44
2

You are correct with the bins, except that each is of the form $$e^{j2\pi f t}$$

(For me life became so much easier with DSP when I stopped thinking of frequencies as sine waves and cosine waves but as phasors spinning in time on the complex plane, which is what the above exponential represents. Indeed each single impulse in the frequency domain is such a spinning phasor in the time domain-- and as Euler's identity shows, you need two such spinning phasors- to represent a cosine or sine).

Due to discrete time periodicity in the frequency domain, the bins also correspond to these frequencies:

$$\{0,500,1000,1500,2000,-1500,-1000,-500\}$$

With bin 3 = 1500 Hz and bin 5 = -1500 Hz. Together you get

$$5.657e^{j2\pi 1500 t} +5.657e ^{-j2\pi 1500 t} $$ which from Euler's identity is equal to $11.314cos(2\pi 1500 t)$!


UPDATE: As Tim Wescott pointed out in the comments, that covers your real part of X[m], the imaginary part would be a sine as $-11.314sin(2\pi 1500 t)$ by following Euler's identity for $sin(\theta)$.

This results in:

$$11.314 (cos(2\pi 1500 t) -sin (2\pi 1500 t)) = 16 cos(2\pi 1500 t + \pi/4)$$

Given the DFT as:

$$ X[k] = \sum_{n=0}^{N-1} x[n] e^{-i \frac{2\pi}{N} nk } $$

The signal would grow by a factor of N, or 8 is this case, so x[n] would be samples of

$$2 cos(2\pi 1500 t + \pi/4)$$


Basically the Discrete Fourier Transform's domain extends from 0 to the sampling rate $F_s$ (actually one sample less than $F_s$) as you have indicated, but also equivalently 0 to $F_s/2$ to -$F_s/2$ to 0 (and again one sample higher than $F_s/2$). The Matlab/Octave command FFTSHIFT does this operation for when you want DC to be in the middle of your plot and have the frequency axis extend to $\pm F_s/2$

This answer may help you to further understand what the frequency spectrum looks like for discrete time signals and it's periodicity:

What is normalized frequency

Below is how I demonstrate this periodicity visually. First understand that $e^{-j2\pi f t}$ is a spinning phasor with magitude one and rotating clockwise on a complex plane at rate f cycles/second. (With that too you should be able to see how Euler's Identity results in a real and sinusoidal waveform).

If we as in the graphic below had a fundamental phasor of $e^{j (2\pi/12)n}$ (Which you would have in a 12 point DFT), notice the following as you count by different increments k for $e^{j (2\pi/12)kn}$ as we vary k from 0 to 11:

k = 0: This results in $e^{j0}$ which is magitude 1 angle 0 (DC).

k = 1: Count through all 12 samples, take 12 samples to complete 1 cycle, normalized frequency is 1/12 cycles/sample

k = 2: Count through every other samples, and complete 2 cycles. Normalized frequency is 2/12 cycles/sample

k = 11: Count through 11 samples at a time, and complete 11 cycles. Normalized frequency is 11/12 cycles/sample

Note from the graphic that this case when k =11 is identical to k = -1, where it takes 12 samples to complete 1 cycle rotating in the opposite direction! So the normalized frequency of 11/12 cycles per sample is identical to the normalized frequency of -1/12 cycles/sample.

(NOTE: "Normalized Frequency" is determined by dividing by the sampling rate: when the frequency is at the sampling rate, the normalized frequency = 1. So you can multiply all the normalized frequencies above by the sampling rate to get frequency terms in Hz if that is easier to follow).
then as we count through n samples one at a time (as in the first bin in the DFT)

DFT periodicity

Also note that the Fourier Transform is just a correlation to each frequency (to correlate two functions, you multiply and integrate, or in discrete terms, multiply and accumulate). Look at the form for the Discrete Fourier Transform with relationship to the "spinning phasors" I describe above, and you will see that for each bin in frequency, you are correlating to that particular frequency!

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • You missed the imaginary part; think $(1 + j)e^{j 2 \pi 1500 t} + (1 - j)e^{-j 2 \pi 1500 t}$. – TimWescott Dec 12 '19 at 19:46
  • @TimWescott Yes I see! Good catch – Dan Boschen Dec 12 '19 at 19:59
  • Thanks a lot for the help @Dan. Just like for Tim's answer, I didn't read your answer entirely yet to see if I can figure out the problem solution with a minipum help--that being said, I can't avoid glimpsing an eye on the slide have just under my eyes while as I write this comment. And as always, this is very informative! – Sylvain Leroux Dec 12 '19 at 20:21
  • @Dan, you've made several edits while I was trying to solve the problem on my side. At some point I got $11.314 \cos(3000 \pi t)-11.314 \sin(3000 \pi t)$ like you did. But I end-up reducing that to $16 \cos[\frac\pi{4}-3000 \pi t)$. I'm far from being confident in my algebra. Nevertheless, could you confirm your solution is the good one? – Sylvain Leroux Dec 12 '19 at 23:28
  • @SylvainLeroux yes that makes sense, draw out the cosine and notice that cosine(a) = cosine(-a), therefore our answers match. The additional scaling by 8 is in the DFT, do you see that? (for example the DFT of [1 1 1 1] is [4 0 0 0], it grew by a factor 4. ) At this point your answer matches mine, Cendron's and Tim's so I think we are good! – Dan Boschen Dec 12 '19 at 23:32
  • @SylvainLeroux So Cendron is pointing out that he got the correct solution first, and he was most concise in terms of a mathematical derivation, so if that is what you were looking for, you should select his as the right/best answer. – Dan Boschen Dec 12 '19 at 23:35
  • "cosine(a) = cosine(-a)" Of course. Sorry about that. Concerning the second part of your comment: " The additional scaling by 8 is in the DFT, do you see that?" There was something like that in a previous exercise I managed to solve by myself by applying the rules given in the course. But I'm not quite sure to understand the physical reality behing that. – Sylvain Leroux Dec 12 '19 at 23:35
  • 1
    You're still a bit off:

    $$ \begin{aligned} 2 \cos(2\pi 1500 t - \pi/4) &= 2 \left[ \cos(2\pi 1500 t ) \cos( \pi/4 ) + \sin(2\pi 1500 t ) \sin( \pi/4 ) \right] \ &= 2 \left[ \cos(2\pi 1500 t ) \sqrt{2} / 2 + \sin(2\pi 1500 t ) \sqrt{2} / 2 \right] \ &= \sqrt{2} \left[ \cos(2\pi 1500 t ) + \sin(2\pi 1500 t ) \right] \ \end{aligned} $$

    It should be $2\pi 1500 t + \pi/4$ for the cosine argument. Check out my alternative in my answer as well.

    – Cedron Dawg Dec 12 '19 at 23:36
  • 1
    My question gives you more of the intuitive explanation for that in terms of it being a correlation but it's simply the summation in the DFT expression. Consider the case of all 1's for x[n] like I did [1 1 1 1]-- the DFT for the first bin would be 1+1+1+1 = 4. So a DC value with "1" grew to a value 4 in the DFT output. The same thing would happen for any other tone that was on bin center for the same reason. – Dan Boschen Dec 12 '19 at 23:38
  • 1
    @SylvainLeroux I agree with Cedron: $2\cos(2 \pi 1500 t + \pi/4)$ is the correct answer. Are you getting that too? If so, I suggest giving him that correct answer Check that you haven't marked off yet. It's a good and concise answer. – Dan Boschen Dec 12 '19 at 23:44
  • Ok, finally I got it. I made a sign error. And end up with $2\sin(\pi/4 - 2\pi 1500 t)$ which is the same as $2\cos(2\pi 1500 t + \pi/4)$ (or are my math still wrong?;) – Sylvain Leroux Dec 13 '19 at 00:02
  • sin(-a) = -sin(a) while cos(-a) = cos(a), and cos(a) = sin(a - pi/2). So cos(a+ pi/4) = sin(a - pi/4) = -sin(-a + pi/4) which is what you have. All good! Those signs were tricky! – Dan Boschen Dec 13 '19 at 00:09
  • 1
    @SylvainLeroux You got it right. It is so easy to slip a sign in this kind of math. – Cedron Dawg Dec 13 '19 at 00:10
  • Sorry, one last comment if I may. The exercise text starts by saying "sampling exactly three cycles of a continuous () sinusoid" Was that totally useless while solving the problem? – Sylvain Leroux Dec 13 '19 at 00:31
  • 1
    Because it sampled exactly 3 samples the Frequency landed right on the center of the DFT bin— See other posts on “spectral leakage” that explains this clearly – Dan Boschen Dec 13 '19 at 00:34
  • 1
    @SylvainLeroux What is really important in that observation is that for a DFT the bin index corresponds to the frequency in units of cycles per frame. Not totally useless, it rules out the possibility that it could be five or eleven or some other alias. – Cedron Dawg Dec 13 '19 at 00:42
  • Thanks a lot for all those detailed explanations! – Sylvain Leroux Dec 13 '19 at 00:54
  • 2
    Happy to help Sylvain- keep at it and you’ll be answering the questions soon! – Dan Boschen Dec 13 '19 at 00:55
  • Dan, from the latter part of your answer you might find my "DFT Graphical Interpretation: Centroids of Weighted Roots of Unity" article interesting. The symmetry for real valued signals becomes intuitively obvious. The URL got mangled in my initial attempt of this comment: https://www.dsprelated.com/showarticle/768.php – Cedron Dawg Dec 14 '19 at 18:11
  • Thanks Cedron- I will have to put it on my reading list. The symmetry for real valued signals is intuitively obvious to me if you simply consider that any impulse on the frequency axis simply represents $e^{j\omega t}$ in time: a phasor spinning in one direction--- you need an equal and opposite (complex conjugate) phasor to stay on the real axis. Euler's identity as a good example of this. Pretty intuitive! – Dan Boschen Dec 14 '19 at 18:12
  • Yeah, it is sort of the same thing there, but it also gives you an intuitive understanding of why a real signal with seven bumps in it would have an off-center (non-zero) value in bin 7, and perhaps 14,21,28 etc. It was a major "aha moment" for me on my DSP discovery road, gosh, almost twenty years ago now. A good answer for "What does the DFT really mean?" When you do sourceless self-study, you sometimes find new stuff, like the first exact frequency formula for non-integer pure tones (two articles later). Keep in mind, this is still generally considered impossible. – Cedron Dawg Dec 14 '19 at 21:15
  • My conclusion for "What does the DFT really mean" is a simple correlation (and a bank of bandpass filters). And the same correlation (multiply and accumulate) structure shows up in so many transforms and signal processing operations -- So in the DFT we are simply correlating to discrete forms of $e^{j\omega t}$ – Dan Boschen Dec 14 '19 at 21:27
  • I've never really liked the "bank of bandpass filters" interpretation. To me a band pass filter means I have an input signal and a filtered output signal, that doesn't quite fit. "multiply and accumulate" is simply the implementation of a dot product, which is still an abstract math concept. The center-of-mass interpretation gives a very concrete physical meaning. Something you can almost hold in your hand. – Cedron Dawg Dec 14 '19 at 21:55
  • 1
    It's not an interpretation, they are indeed block filters, it's an identical process as FIR filters are simply dot products as well. It becomes very clear if you consider a sliding DFT shifting the input by one sample and recomputing to see that the output is indeed the output that a bank of filters will provide. It gives great intuitive insight into spectral leakage as well as other insights, you should look at that closer from that view. – Dan Boschen Dec 14 '19 at 22:06