LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find all peaks in FFT spectrum

Solved!
Go to solution

Hello,

I am reading data from a text column and doing FFT. After FFT I would like to get ALL frequencies which are above a specified threshold. I am already using peak detector but I only get 1 value as a result. But I would like to get all frequencies which are above the threshold. I attached a screen.

In short, how can I use the peak detector function to get multiple peaks from FFT data, instead of just one (which is always the first one above the threshold).

Thanks

0 Kudos
Message 1 of 3
(6,273 Views)

>After FFT I would like to get ALL frequencies which are above a specified threshold.

 

This is in contradiction with your title. The title says you want all peaks, here you're saying you want all frequencies above a maximum. This is a totally different problem.

 

I'm not being picky here, peak detection is tricky and starts with a good definition of the what you require.

 

>I am already using peak detector but I only get 1 value as a result. But I would like to get all frequencies which are above the threshold. I attached a screen.

 

To get all frequencies above a threshold, simply do a compare (x>y) between the frequencies and the threshold. You'll get an array of Booleans. Put them through a for loop, and output the loop counter as a conditional array. Then you'll have all the frequency indices above the threshold.

 

In short, how can I use the peak detector function to get multiple peaks from FFT data, instead of just one (which is always the first one above the threshold).

 

Try (NI_AAL_SigProc.lvlib) Peak Detector.vi (quick drop: "Peak"). 

 

Message 2 of 3
(6,238 Views)
Solution
Accepted by topic author Konvict

I posted a peak detection snippet last week that might be useful..

 

https://forums.ni.com/t5/LabVIEW/How-to-find-the-Nth-lowest-local-maximum/m-p/3686345#M1036545

 

peak_detect_from_array.png

 

 

 

Message 3 of 3
(6,214 Views)