# DFT frequency resolution exercise [closed]

I have a discrete signal that goes as follows: $$x[n]=[-1,4,-1,0]$$ I have already done the DFT for the signal, with the following result: $$X = 2, X=-4i,X=-6,X=4i$$ But for some reason, I seem to have trouble getting the frequency resolution for these samples(?). My sampling interval (T) is 0.03125 seconds, and with some logical deducting I came up with these following frequencies: $$f_0=0,f_1=8,f_2=16,f_3=8$$ However, I do not understand how I came to this conclusion, but it seems correct. I tried to use the following formula: $$\Delta f = \frac{1}{T_{0}} = \frac{1}{NT}$$ Could someone explain how I ended up with these frequencies?

• "With some logical deduction": what did you deduct? How should we tell you how you ended up with these frequencies if you don't tell us? – Marcus Müller Nov 14 '19 at 16:59
• @MarcusMüller Well, since the first sample has the value of zero, I simply counted it out as zero. The second sample I got from the formula, using T = 0.03125 and N = 4. I reasoned that since the DFT from the second and fourth sample are conjugates, their frequency could be the same since their absolute value is the same, 4. The third sample was a guess. – TootsieRoll Nov 14 '19 at 17:12
• If your values are based on guesses, there's really nothing for us to explain here, honestly. You will need to revisit what you're doing from the basics of what the DFT is – it's actually not hard. You can see the frequencies in the exponent in the sum. – Marcus Müller Nov 14 '19 at 17:13
• @MarcusMüller Are you implying that I did not do something that I know I did? – TootsieRoll Nov 14 '19 at 17:15
• So, if you did that, how comes you needed to guess? – Marcus Müller Nov 14 '19 at 17:19

Carry the units and it becomes understandable.

T = 0.03125 seconds per sample

1/T = 32 samples per second

Each bin corresponds to the cycles per frame. Your frame has four samples. Suppose the bin index is k.

k (cycles per frame) * 32 (samples per second) / 4 (samples per frame) = 8k cycles per second = 8k Hz

So the frequencies for your bins, in Hz, become

k   f_k
0   0
1   8
2   16
3   24


However, the DFT wraps around, and choice of the principal frequency among many aliases is a matter of convention. It is mathematically sounder to consider the upper half of the DFT as negative frequencies. For real valued signals, the upper half is just the complex conjugate of the lower half and thus provides no new information so it is usually ignored. So, if you want to consider f_3 as 24 or -8, it doesn't really matter. For a real valued signal, a negative frequency is the same as a positive frequency.

A rectangular window of $$N = 4$$ samples, at a sampling rate of $$32$$ Hz would provide about $$\Delta f = \frac{4\pi}{4} \frac{32}{2\pi} = 16 ~Hz$$ of frequency resolution...

On the other hand, the apparent DFT bin frequencies, will be :

$$f_k = [0,8,16,24]$$ Hz.

Interpret the last frequency as $$24-32 = -8$$ Hz due to the sampling theorem.