0

For example if I have 10 samples in the FFT in a system sampled at 100 Hz. Then how are the results represented in FFT bin output ? The frequency resolution is going to be how many Hz each DFT bin represents. This is, as you have noted, given by fs/N. In this case :--

resolution = 100/10 = 10 hz

Definition of FFT states that frequency range [0,fs] is represented by N point.

But when the result comes :--

  • X[0] is the constant term (also refereed to as DC bias)
  • X[1] is the 10 hz
  • X[2] is the 20 hz
  • X[3] is the 30 hz
  • X[4] is the 40 hz
  • X[5] is the 50 hz
  • X[6] to X[9] are the complex conjugates of X[4] to X[1] respectively.

so my question is :--
X[6] is the 60hz signal & its value will be complex conjugate of 40 hz signal .. is it right ?
Or X[6] does not contains spectral of 60hz but it is only complex conjugate of X[4] ?

Please suggest.

Katoch
  • 2,709
  • 9
  • 51
  • 84

2 Answers2

3

The frequencies of each bin in the DFT go from $n = 0 to N-1$ where each frequency is given as $n F_s/N$.

Due to the sampling process, for any signals (either real and complex signals) the upper half of this frequency spectrum that extends from $F_s/2$ to 1 sample less than $F_s$ is equivalent to the negative half spectrum (the spectrum that extends from $-F_s/2% to 1 sample less than 0.). This applies to the DFT and all digital signals.

This is demonstrated in the graphics below, showing how an analog spectrum (top line), convolves with the sampling spectrum (second line) of a system sampled at 20 Hz to result in the digital spectrum of a sampled signal. Since the spectrum is unique over a 20 Hz range (and repeats everywhere else), we only need to show the frequencies over any 20 Hz range to represent the signal. This can be identically shown from -10 Hz to +10 Hz, or 0 to 20 Hz.

Representing the sampled spectrum of a real signal sampled at 20 Hz over the range of -10Hz to +10Hz:

Sampling real 1

The same signal can also be represented over the range of 0 to 20 Hz:

Sampling real 2

Representing the sampled spectrum of a complex signal sampled at 20 Hz over the range of -10Hz to +10Hz:

Sampling complex 1

The same signal can also be represented over the range of 0 to 20 Hz:

Sampling complex 2

Since the spectrum for the DFT is discrete, the samples go from $n = 0 to N-1$ where each frequency is given as $F_s/n$ as described above. There is also only N samples in the DFT of course but as you rotate the samples in the DFT, you effectively move through the expanded spectrum above. It is helpful to view the spectrum on the surface of a cylinder with a circumference that goes from 0 to $F_s$ where you see that $F_s$ is equivalent to 0, and going backwards from 0 is equivalent to going into the negative half spectrum.

So in your example specifically:

X[0] = DC

X1 = 10

X2 = 20

X3 = 30

X4 = 40

X[5] = 50

X[6] = 60

X[7] = 70

X[8] = 80

X[9] = 90

Can also be represented as

X[0] = DC

X1 = 10

X2 = 20

X3 = 30

X4 = 40

X[5] = -50

X[6] = -40

X[7] = -30

X[8] = -20

X[9] = -10

Note that the command "FFTSHIFT" in MATLAB shifts the DFT vector accordingly to produce the following order representing the range from -F_s/2 to +F_s/2 :

fftshift([X[0], X1, X2, X3, X4, X[5], X[6], X[7], X[8], X[9]]) =

[X[5], X[6], X[7], X[8], X[9], X[0], X1, X2, X3, X4]

Dan Boschen
  • 265
  • 1
  • 11
  • This means output of DFT or (DFT performed using FFT algorithm).. both will contains information upto sampling frequency? What if i am interested in frequency upto fs/2 = 50 hz and i put an anti aliasing filter with cutoff frequency little more than 50 hz .. suppose 55 hz .. then in this case value of my FFT bin X[6]= X[7]= X[8]= X[9]=0 .. is it right ? – Katoch Jun 09 '17 at 06:29
  • 1
    To your question and final sentence, no. Those upper bins represent the negative frequencies in the first Nyquist zone. By putting in an anti-alias filter it simply means that the upper frequencies in the analog world will be blocked from being mapped to the first Nyquist zone in the sampling process. I believe I have another post that details that; let me find it – Dan Boschen Jun 09 '17 at 10:21
  • What exactly is this Nyquist zone ? – Katoch Jun 09 '17 at 11:05
  • The frequency range of -Fs/2 to +Fs/2 where Fs represents the sampling rate is the "First Nyqust Zone". – Dan Boschen Jun 09 '17 at 11:06
  • 1
    This post may help you: https://dsp.stackexchange.com/questions/31843/aliasing-after-downsampling/31929#31929 The higher Nyquist zones are the frequency ranges in the analog that would map to the same frequency as in the first Nyquist zone due to the sampling process. – Dan Boschen Jun 09 '17 at 11:10
  • 1
    this link also explain well .... https://www.nutaq.com/analog-digital-part-3-signal-sampling/ – Katoch Jun 09 '17 at 11:50
  • " Those upper bins represent the negative frequencies in the first Nyquist zone." so as rotation speed increases beyond nyquist frequency ... it will appear as if circle moving CCW direction... thats why you are calling them negative frequency .... – Katoch Jun 09 '17 at 11:57
  • So we can conclude that for (FFT or DFT)bins above N/2 will always represent the -ve frequency... and if input to FFT algorithm is real number then negative frequencies in higher bins will be complex conjugate of lower bin frequency.. is it right ? – Katoch Jun 09 '17 at 13:12
  • 1
    Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/146263/discussion-between-dan-boschen-and-katoch). – Dan Boschen Jun 09 '17 at 13:23
  • If I press this chat link my stack exchange android app keep refreshing..saying loading discussion between Dan & me ..Why so ? – Katoch Jun 10 '17 at 08:26
1

Assuming your input signal is purely real, then X[6] is just the complex conjugate of X[4]. The top half of the spectrum is essentially redundant for real signals. See: this question and answer for further details.

Note that the input signal should be bandwidth-limited to fs / 2, otherwise aliasing will occur, so for a baseband signal there should not be any components >= fs / 2.

Paul R
  • 208,748
  • 37
  • 389
  • 560
  • you said "Assuming your input signal is purely real" what if my input signal are complex .. then X[6] to X[9] are NOT the complex conjugates of X[4] to X[1] .. is it right ? – Katoch Jun 08 '17 at 09:58
  • 1
    Yes, that's correct - you only get complex conjugate symmetry for purely real inputs. – Paul R Jun 08 '17 at 10:58
  • This means output of DFT or (DFT performed using FFT algorithm).. both will contains information upto sampling frequency? What if i am interested in frequency upto fs/2 = 50 hz and i put an anti aliasing filter with cutoff frequency little more than 50 hz .. suppose 55 hz .. then in this case value of my FFT bin X[6]= X[7]= X[8]= X[9]=0 .. is it right ? – Katoch Jun 09 '17 at 06:29
  • You need an anti-aliasing filter with a cutoff *below* fs/2 (Nyquist) to avoid aliasing. Also note that the top half of the bins do *not* correspond to frequencies from fs / 2 to fs - they are actually negative frequencies (but of course the output is also periodic in the frequency domain, so these negative frequencies can be aliased). – Paul R Jun 09 '17 at 06:34
  • you said " below fs/2 " because no filter is ideal filter .. so transition band will be there which ends up at fs/2 is it right ? And if i design antialising filter with cut-off-frequency = fs/2 then due to transition band higher frequency component will be able to get through.. have i got it right ? – Katoch Jun 09 '17 at 06:45
  • 1
    Yes, you got that part right, the passband usually extends to just below fs / 2, so that fs / 2 is in the stopband. – Paul R Jun 09 '17 at 06:59