Skip to main content
17 events
when toggle format what by license comment
May 7, 2022 at 23:25 comment added Dan Boschen @Curious right- doesn’t make sense to me either: 2f_s/N is a scaling of magnitude not bandwidth
May 7, 2022 at 18:08 vote accept Curious
May 7, 2022 at 18:08 comment added Curious this makes sense, thank you!) but I still confused about bandwidth definition I found, why it is possible to substitute the whole sequence by just $N/2$ samples with the bandwidth $2f_s/N$ for all samples except first and last with bandwidth $f_s/N$ - big mystery for me...
May 7, 2022 at 15:59 comment added Dan Boschen @Curious Look at the DFT formula, and then consider the simplest case of the DFT of N ones—- you’ll see that bin 0 is the sum of the N samples and thus the DFT grows by N. All bins grow by N and as you see the sinusoids will result in two bins each being N/2.
May 7, 2022 at 15:11 comment added Curious ok, multiplying by factor of 2 is clear (as you mentioned according to the Euler formula), but why should I divide output result by N?
May 7, 2022 at 15:02 comment added Dan Boschen &Curious If you use all the N bins you would divide by N and each sinusoidal tone will occupy two bins (if at bin center) each with a magnitude of 1/2 (consistent with Euler’s formula and the FT of a sinusoid. If it is real then the negative frequencies are redundant so you can just use the positive frequencies and multiply each of those tones by 2 (except DC since the FT of DC is a single impulse unlike the sinusoids). This is not the bandwidth of each bin but the scaling factor.
May 7, 2022 at 14:49 comment added Curious let me explain the full "story" in this case)) I'm trying to output the frequency spectrum using np.fft.fft() corresponding to the time-domain amplitudes, I found that if I divide the result of this function by $N/2$ (or multiply by $2/N$) and also divide the first and last samples by $N$ (as in the book!), I'll get the desired result - amplitudes in frequency domain will unambiguously correspond to amplitudes in time-domain, but why I should divide by $N/2$ - this is the main question for me
May 7, 2022 at 14:30 comment added Dan Boschen @Curious what is consistent about the Python function? The Python function is consistent with what I wrote; what are you referring to that would be otherwise?
May 7, 2022 at 14:21 comment added Curious sure, that is exactly what I was confused about: in your answer you clearly define the bandwidth as 1 bin, however such definition as in the book is consistent with standard Python function np.fft.fft() even for the first and last bins, that's why it caused even more confusion...
May 7, 2022 at 14:08 comment added Dan Boschen @Curious well the last diagram given in that link isn’t even consistent with the sample number on that index. However he may be defining bandwidth as the “null to null bandwidth” of the main lobe (see my last plot above) however this isn’t what is typically defined as bandwidth. Further the example given in the link (and most of that book) is limited to real waveforms only. There is no difference in the bandwidth of the first and last bins compared to any others.
May 7, 2022 at 12:33 comment added Curious thank you for the link! for now, I'm reading this chapter and trying to interpret the data on Figure 8-7, it looks that here the bandwidth is not just $f_s$ it is $2f_s$ and I'm wondering why...
May 7, 2022 at 10:23 comment added Dan Boschen @Curious this link may help as well if you read the section “filter bank view of the DFT”: dsp.stackexchange.com/a/32086/21048
May 7, 2022 at 0:41 comment added Dan Boschen @Curious onsider an actual frequency that is not right at bin center— it shows up in all the other bins according to each bins frequency response.
May 6, 2022 at 20:20 comment added Curious the understanding of bandwidth definition will allow me correctly calculate frequency domain amplitudes to apply inverse DFT further.
May 6, 2022 at 20:17 comment added Curious I thought that $f_s/N$ is the center of the bin (just a point, not bandwidth); I'm a bit confused of bandwidth definition, because here it looks that $f_s/N$ is just a point ($f_s=1$).
May 6, 2022 at 12:53 history edited Dan Boschen CC BY-SA 4.0
added 448 characters in body
May 6, 2022 at 12:46 history answered Dan Boschen CC BY-SA 4.0