Thursday 25 June 2015

Simple questions related to dft



I'm reading a book about dsp and doing some exercises. Here is question that confused me:


A peak appears at index number 19 when a 256 point DFT is taken of a signal


1) What is the frequency of the peak expressed as a fraction of the sampling rate? Do we need to know the actual sampling rate to answer this question?


2) What is the sampling rate if the peak corresponds to 21.5 kHz in analog signal?


My answers:


1) 19/256; no we don't need to know actual sampling rate


2) I think that we can't answer this question without additional info. Or maybe it is ((21.5/19)*256)*2 kHz?


Thanks in advance



Answer



The actual frequency in Hertz corresponding to DFT index $i$ with a DFT length of $N$ is



$$f=\frac{i}{N}f_s,\quad i=0,1,\ldots N-1\tag{1}$$


where $f_s$ is the sampling frequency. So if indices are numbered starting from $0$ (and index number $19$ is indeed the $20^{th}$ frequency bin, as assumed in (1)), then your answer is correct.


As for part 2 of the question, the answer is also given by (1), so


$$f_s=\frac{Nf}{i}$$


which gives $f_s=289.7\text{ kHz}$ for the given values of $i$, $N$, and $f$.


No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...