DSPRelated.com
Forums

About FFT bins

Started by JAlbertoDJ September 2, 2009
On Sep 2, 11:23&#4294967295;am, "JAlbertoDJ" <nietoro...@yahoo.es> wrote:
> Supposse Fs=1000Hz > > Then, with a FFT of N=10 i could measure spectral bins each 100Hz: > > &#4294967295; &#4294967295; &#4294967295; 0 &#4294967295;100 200 300 400 500 600 700 800 900 Hz > &#4294967295; &#4294967295; &#4294967295; 0 &#4294967295; 1 &#4294967295; 2 &#4294967295; 3 &#4294967295; 4 &#4294967295; 5 &#4294967295; 6 &#4294967295; 7 &#4294967295; 8 &#4294967295; 9 &#4294967295;N > > But....if i want measure this: > > &#4294967295; &#4294967295; &#4294967295; 1 &#4294967295;101 201 301 401 501 601 701 801 901 Hz > &#4294967295; &#4294967295; &#4294967295; 0 &#4294967295; 1 &#4294967295; 2 &#4294967295; 3 &#4294967295; 4 &#4294967295; 5 &#4294967295; 6 &#4294967295; 7 &#4294967295; 8 &#4294967295; 9 &#4294967295;N > > How i can do it? &#4294967295; > > I could do zero padding until N=1000, but i am sure could be other > solution more efficient.
1) Mix the signal with a complex sinusoid which has a frequency of 1 Hz. This shifts the signal at 1Hz down to 0 Hz, 101 Hz to 100 Hz. 2) Instead of using the FFT, you can use a Chirp Z transform. This is essentially the same thins as above but it is applied to the FFT instead of the signal. The CZT is less efficient than the FFT. Cheers, David
> >Supposse Fs=1000Hz > >Then, with a FFT of N=10 i could measure spectral bins each 100Hz: > > 0 100 200 300 400 500 600 700 800 900 Hz > 0 1 2 3 4 5 6 7 8 9 N > >But....if i want measure this: > > 1 101 201 301 401 501 601 701 801 901 Hz > 0 1 2 3 4 5 6 7 8 9 N > >How i can do it? > >I could do zero padding until N=1000, but i am sure could be other >solution more efficient. >
If you need to analyze these frequencies only without filter/synthesis, you may use Goertzel algorithm. It's bandwidth depends from analysis window, so you may get 1Hz resolution using appropriate window length. It will take less CPU/Memory using Goertzel for several bins than increasing FFT size.
On Sep 3, 5:21&#4294967295;am, "JAlbertoDJ" <nietoro...@yahoo.es> wrote:
> >On Sep 2, 1:43=A0pm, "JAlbertoDJ" <nietoro...@yahoo.es> wrote: > >> >Do you have a single tone or mutiple tones present at the same time? > > >> >(Assuming single tone present at any time) Is there any time between > >> >the tones? If not, how do you handle the possibility of parts of 2 > >> >tones in an > >> >analysis window? > > >> >Do you know that the 8000 Hz sound card is really at 8000 Hz? It > isn't > >> >always. > > >> >Dirk Bell > >> >DSP Consultant > > >> I have a single tone in each symbol interval and there is not time > betwee= > >n > >> tones. A windows is displacement each 1/16 symbol duration while i > compar= > >e > >> 16 values of FFT, so i get metric for each tone for each window > interval. > >> When window is perfectly center the metric is maximal. > > >> In fact, i compute viterbi soft-decision for each window interval and > i > >> use metric after viterbi for symbol sincronization. So, for Es/N0 very > po= > >or > >> differents are of 4dBs gain than sincronization before viterbi. But > >> computer requeriments are biggest. With a good Es/N0 there is not > >> differents. > > >> But now the question is the frecuency syncronization with only 512FFT > >> points. > > >Since your sample rate is much higher than the total signal bandwidth > >you could consider complex mixing to get 1000 Hz to 0 Hz (8-pt complex > >table, lots of 0's and 1's), or mix 1125 Hz to 0 Hz (you can do more > >decimation, discussed next), you can do the tradeoffs. &#4294967295;Then use > >halfband filters to reduce the sample rate, &#4294967295;Keep the aliasing out of > >the band of interest and you don't have to remove it unless it is > >large compared to your desired signals. &#4294967295;You can use a smaller FFT the > >more you decimate. You should be able to cut down your computations > >this way. This still does not solve the problem of synchronizing your > >analysis window with data. > > >Dirk Bell > >DSP Consultant > > I think the solution could be a mixer to compensate slightly the frecuency > desviation: deltaF > > So, before compute the 512FFT do: &#4294967295;x(k)=x(k)*exp(j2*pi*k*deltaF/Fs) &#4294967295; (1) > > For example, if i know that delatF = 2 Hz, after apply Equation(1) and > after do FFT we have: > > &#4294967295; k=64 => 1002 Hz &#4294967295; &#4294967295; &#4294967295; &#4294967295;instead of 1000 Hz &#4294967295; > &#4294967295; k=65 => 1017.625 Hz &#4294967295; &#4294967295;instead of 1015.625 Hz &#4294967295; > &#4294967295; k=66 => 1033.25 Hz &#4294967295; &#4294967295; instead of 1031.25 Hz &#4294967295; > &#4294967295; k=67 => 1048.875 Hz &#4294967295; &#4294967295;instead of 1046.875 Hz &#4294967295; > > Problem resolved. > > Now the problem is how i can estimate deltaF. > > I think i could use the phase of FFT (atan(Im/Re)) over several symbols > because all 16 tones are continuous phase. > > Any suggerent?- Hide quoted text - > > - Show quoted text -
Keep in mind that after the mixer (compex I am assuming), the signal to be FFT'ed will be complex rather than real, so you will not be able to use the more computationally efficient real-FFT. Could consider a stage of decimate by 2, with out of band aliasing allowed, before any mixing, to save computations (now using an FFT of half the original size). Further decimation will allow smaller FFTs with the same resolution. Dirk Bell DSP Consultant
On Sep 2, 11:23 am, "JAlbertoDJ" <nietoro...@yahoo.es> wrote:
> Supposse Fs=1000Hz > > Then, with aFFTof N=10 i could measure spectralbinseach 100Hz: > > 0 100 200 300 400 500 600 700 800 900 Hz > 0 1 2 3 4 5 6 7 8 9 N > > But....if i want measure this: > > 1 101 201 301 401 501 601 701 801 901 Hz > 0 1 2 3 4 5 6 7 8 9 N > > How i can do it? > > I could do zero padding until N=1000, but i am sure could be other > solution more efficient.
In general, the Discrete-Time Fourier Transform (DTFT) is given by: X(\omega) = \sum_{k=0}^{N-1] x[k] \exp(-j*\omega*k) for a discrete time sequence x[k], k=0, 1, ..., (N-1). The usual N-point DFT is obtained by substituting \omega = 2*pi*n/N where n=0, 1, ..., (N-1). You want instead the values of X(2*pi*n/N + \delta) where n=0, 1, ..., (N-1). Substituting back in the original equation, you will find that you need to consider the discrete time sequence: x[k]*\exp(-j*\delta*k) and find the N-point DFT of that new sequence.