1

I need to identify the prek frequency contineously. I've tried FFT and JTransform
But i didn't get correct frequency and it has lots of noise. I don't know how to rectify that.I've searched on google, unfortunately i didn't find proper one.
So if you have any other working example determining peak frequency.

Please share with us,

Thank you.

Mayuri
  • 402
  • 6
  • 13
  • perhaps this blog entry will help. It's in C but there's link to similar java code. http://blog.bjornroche.com/2012/07/frequency-detection-using-fft-aka-pitch.html – Bjorn Roche Apr 17 '14 at 14:08
  • What is your test input? How are you calculating the frequency? How do you know the result is wrong? – hotpaw2 Apr 17 '14 at 18:57
  • What is your signal source? How do you know the peak frequency or frequencies of your signal source? What has lots of noise, your input signal or the output of your frequency analysis? – Babson Apr 20 '14 at 17:48
  • I've reffered from [this post](http://stackoverflow.com/questions/21853063/wrong-values-in-calculating-frequency-using-fft?rq=1) – user3544831 Apr 21 '14 at 05:06

1 Answers1

1

I'm still not sure what your input signal is, or how you know that you're getting the wrong peak frequencies from your Fourier analysis and/or from your peak detector.

In general, to test your FFT you'll want a synthetic pure tone, such as this 32 Hz cosine tone.

Synthetic 32 Hz cosine tone - Sooeet.com FFT calculator

When you process this pure tone with your FFT you should get a single peak at 32 Hz like this:

FFT spectrum of synthetic 32 Hz cosine tone - Sooeet.com FFT calculator

To test your peak detection code, you'll want to attenuate your 32 Hz tone to say half power, and add another full power pure tone at say 64 Hz, like this:

Synthetic 32 Hz and 64 Hz cosine tones - Sooeet.com FFT calculator

When you process these two harmonics with the FFT you should get two peaks at 32 and 64 Hz, and the 32 Hz peak should be at half power relative to the 64 Hz peak.

FFT spectrum of synthetic 32 Hz and 64 Hz cosine tones - Sooeet.com FFT calculator

After your code is working fine with the above synthetic signals, you should try a real known signal such as this single E2 note being plucked on an acoustic guitar:

Guitar E2 note - Sooeet.com FFT calculator

The FFT spectrum of this E2 note signal looks like this:

FFT spectrum of guitar E2 note - Sooeet.com FFT calculator

With this real signal, your peak power detector should find the 161 Hz peak, which for this signal happens to be the first harmonic of the E2 note. The lower-power peak at 80 Hz is the true fundamental frequency of the E2 note.

Synthetic signals and real signals can be generated with the Sooeet FFT calculator

Babson
  • 909
  • 1
  • 7
  • 7