Endpoint Detection: Distinguishing Peaks from Noise

  • Thread starter Thread starter inadaze
  • Start date Start date
  • Tags Tags
    Detection
Click For Summary

Discussion Overview

The discussion revolves around methods for distinguishing peaks from noise in signal processing, specifically in the context of using Fast Fourier Transform (FFT) to analyze signals. Participants explore techniques for identifying significant peaks in the frequency domain, addressing both theoretical and practical aspects of the problem.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Homework-related

Main Points Raised

  • Jay seeks assistance in writing code to identify peaks in a signal after performing an FFT, noting that some peaks are small but distinguishable visually.
  • Warren suggests computing the mean and standard deviation of the FFT output to identify peaks that are significantly above the mean.
  • Jay expresses confusion about the terms "mean" and "standard deviation," asking for clarification on these concepts in the context of FFT output.
  • Warren explains the concept of "bins" in FFT results and provides a formula for calculating standard deviation, emphasizing its role in identifying peaks.
  • Jay questions whether to include mirror reflections of peaks in the mean calculation and expresses confusion over a complex number obtained during standard deviation calculation.

Areas of Agreement / Disagreement

The discussion includes a mix of technical explanations and requests for clarification, with no consensus on the specific methods for calculating mean and standard deviation in the context of Jay's FFT results. Participants have differing levels of understanding, leading to ongoing questions and elaborations.

Contextual Notes

Jay's understanding of statistical concepts appears limited, which may affect the application of Warren's suggestions. The discussion also highlights potential confusion regarding the treatment of complex numbers in FFT results.

Who May Find This Useful

Individuals interested in signal processing, particularly those new to using FFT for peak detection and those seeking clarification on statistical methods in this context.

inadaze
Messages
20
Reaction score
0
Hi all,
I am trying to write a code that can determine peaks in a signal. What I am doing is recording a signal then running an fft to calculate the fundamental frequency and the overtones (consonant and dissonant harmonics). The problem is that some of the peaks are very small but are always distinguishable by looking at the plotted results. Has anyone had any experience with writing a code that could distinguish peaks from noise.

Thanks
Jay
 
Computer science news on Phys.org
Compute the mean and standard deviation of the values in the bins. Then it should be easy to recognize peaks that are say, two standard deviations greater than the mean.

- Warren
 
Thanks for your reply, but unfortunately I am not that educated in these terms. Could you really spell it out for me...I don't know what is the "mean" and "standard deviation(although I can guess at this)" of values in the "bins".
Sorry to make you elaborate, but I am kinda new to this stuff.

Thanks
Jay
 
When you take an FFT, the resulting array of numbers is often referred to as an array of "bins," since each number actually indicates the power in a small range of frequencies. You can just call them numbers if you like.

The arithmetic mean of the array is simply the average value. Add all the bins and divide by the number of bins to get the mean. I will denote the values in the bins as x, and the mean of those values as [itex]<x>[/itex].

The standard deviation is a measure of the spread in the data. Since most of the bins contain nothing but noise and have roughly the same value, the data generally has a small spread. Calculate the standard deviation ([itex]\sigma[/itex]) as

[tex]\sigma = \sqrt{<x^2> - <x>^2}[/tex]

In words, take the mean of the squares of all the bins, subtract the square of the mean of the bins, and take the square root of it all. The resulting number represents how much a typical bin differs from the mean. Any bin that contains significantly more power than the mean plus this typical difference -- say, a bin whose value is several standard deviations above the mean -- is probably a peak.

- Warren
 
When I take an FFT I get a mirror reflection opposite the peaks. Do I take these as well when calculating the mean?
Also, when I calculate the standard deviation it gave me this number:
0 +5.8949e+004i
What does this mean?
do I add this to the mean to find out what is considered a peak?
Or did I do something wrong?


Thanks
Jay
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
Replies
17
Views
7K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
7K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
3
Views
2K
  • · Replies 49 ·
2
Replies
49
Views
7K