Hi all! I have fd=65KHz. I do fft with window Hann 4096 points. I need detect frequency 12kHz...20kHz with resolution 2 Hz. What must I do? I understand that i must mix input signal with 12 kHz sine. How?
Zoom FFT
Started by ●July 18, 2005
Reply by ●July 18, 20052005-07-18
Piter Wolf wrote:> Hi all! > I have fd=65KHz. I do fft with window Hann 4096 points. I need detect > frequency > 12kHz...20kHz with resolution 2 Hz. What must I do? I understand that > i must mix input signal with 12 kHz sine. How?You need to set up a different FFT length. If you by "fd" means "sampling frequency", you will need an FFT length of at least 32500 points. You basically need a frequency bin width that is smaller than the desired frequency tolerance. Rune
Reply by ●July 18, 20052005-07-18
Yes, i know, but I hav't set up diffferent FFT length, i must do it on 4096 points. I know algorithm: bandpass fiter->downshift frequency ->filter->decemation->fft. I don't know how do downshift :((
Reply by ●July 18, 20052005-07-18
Reply by ●July 19, 20052005-07-19
"Rune Allnor" <allnor@tele.ntnu.no> wrote in news:1121712804.369670.159280@z14g2000cwz.googlegroups.com:> > > Piter Wolf wrote: >> Hi all! >> I have fd=65KHz. I do fft with window Hann 4096 points. I need detect >> frequency >> 12kHz...20kHz with resolution 2 Hz. What must I do? I understand that >> i must mix input signal with 12 kHz sine. How? > > You need to set up a different FFT length. If you by "fd" means > "sampling frequency", you will need an FFT length of at least > 32500 points. You basically need a frequency bin width that is > smaller than the desired frequency tolerance. > > Rune >No he doesn't need 32500 points since he is interested in 12k to 20k = 8k range. A 4096 point FFT will give him 2 Hz bins Here is a block diagram of zoom fft http://www.numerix-dsp.com/zoomfft.html Basically you want to multiple by a 16 k cosine and sine to translate the signal to DC. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Reply by ●July 19, 20052005-07-19
If your FFT is fixed at 4096 points you could also try to estimate the true peak position using parabolic interpolation around the peak in the calculated spectrum. I have had acceptable results using this approach in the past. Hope this helps, Dave.
Reply by ●July 19, 20052005-07-19
Ok, I multiplie witn sine and cosine, what filter i need? 8 k or 4 k? and I shall have spectrum on 4k, but no 8k. I don't understand:((
Reply by ●July 19, 20052005-07-19
"Piter Wolf" <kuzmina@smtp.ru> wrote in message news:1121760742.785368.45030@f14g2000cwb.googlegroups.com...> Ok, I multiplie witn sine and cosine, what filter i need? 8 k or 4 k? > and I shall have spectrum on 4k, but no 8k. I don't understand:((You need two 4kHz LPF's, one on the cosine'd and one on sine'd signal. You downconvert so zero hz is in the middle of the passband (ie, mix with 16kHz so 16kHz -> 0Hz). If you only take one of the two mixed quadrature signals, you cannot tell if the signal is in the 4kHz above or below 16kHz. By using both the quadrature signals, you can tell if it's a negative or positive frequency relative to the 16kHz and the FFT will correctly show this, albeit shifted round by 2048 bins. Cheers, Howard
Reply by ●July 19, 20052005-07-19
my C code spectrum :
win_out_r- mixed signals 1 after window -4096 points
win_out_i -mixed signals 1 after window - points
r_output - real after fft 4096 points
i_output -imag after fft 4096 points
.
.
.
cfft4096( win_out_r,win_out_i ,r_output, i_output );
for( i=0 ; i<n_samp; i++ )
spectr[i] = (r_output[i] * r_output[i] + i_output
[i] *i_output [i])*2/n_samp;
.
.
.
Standart procedure, i have symmetrical spectrum. Real spectrum have
2048 points
how using quadrature signals ?
Reply by ●July 20, 20052005-07-20
Hi Piter> spectr[i] = (r_output[i] * r_output[i] + i_output > [i] *i_output [i])*2/n_samp;This won't work for what you're trying to do! For the power spectrum of a quadrature signal you need to do this: spectr[i] = ((r_output[i] + i_output [i])/n_samp)^2 I know it may look wrong, but you need to look at http://www.dspguru.com/info/tutor/QuadSignals.pdf. This document fairly hard work if your math is rusty (like my 20+ year old degree level math) but the description is as good as I've seen.> Standart procedure, i have symmetrical spectrum. Real spectrum have > 2048 points > how using quadrature signals ?You will get a 4096 point non-symetrical spectrum with my correction above. Cheers, Howard






