Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

peak analysis: how to select prominent peaks

Hi,

 

I am doing peak analysis. I am using the peak detector vi. I want to see only prominent peaks. can anyone suggest how to do it? If I use width variable, it can shift peak postion. in Matlab there is MinPeakDistance to fix it. Is there anything similar to this in labview.

 

 

0 Kudos
Message 1 of 5
(5,175 Views)

The Peak Detector VI has a threshold input. That should help.

 

A lot depends on your data. How close is the largest "non-prominent" peak in amplitude to the smallest "prominent" peak? Are there other charcteristics such as x-axis spacing which can help determine the peaks?

 

Lynn

0 Kudos
Message 2 of 5
(5,160 Views)

Thanks for your reply. Yes, but the threshold changes the peaks location and amplitude as well. You are exactly right, I may need another parameter to fix it. Please find the attached program (rough) and a data file. Your comments/suggestions wolud be appreaciated. Also, find the images for different threshold values. Please change extension of the file: peakfinding.txt to peakfinding.vi.

 

 

 

0 Kudos
Message 3 of 5
(5,154 Views)

I do not have time right now to dig into your VI and data but here are a few observations.

 

- The baseline is about as high in some places as peaks in other places.

- Some of the peaks, such as around 2.4 on the Time axis, are not much different from the noise level.

- You mention that the peak amplitudes and locations move when threshold and width are changed. This is expected. Read the detailed help file for the Peak Detector VI. It explains how a polynomial is fitted to points around the peak and the calculated locations and amplitudes are derived from the coefficients of the polynomial.  If you expand the graph around the peak near 1.65 you can see that the measured data points are not symmetrically distributed around the largest value. This suggests that the true peak is probably between the two highest data points and that is what the peak detector tries to find.

 

Because the baseline varies so much you may need to do an adaptive peak finding process where the threshold varies according to the baseline.

 

If you want the highest value in each peak rather than the estimated amplitude from the peak detector, use the peak detector to find locations and then take an Array Subset with length 2*width centered at the peak location. Use Array Max & Min to find the highest value and its index within that subset. 

 

Anytime you are measuring data there will be noise and uncertainty associated with the measurement. In addition when samples are taken at discrete intervals almost always no sample occurs at the exact maximum point. So you need to decide based on the expected behavior of the system you are measuring, what form of approximation or estimate is best suited to the characterization of your data.

 

Lynn

0 Kudos
Message 4 of 5
(5,148 Views)

you can try to use the peak search twice.

 

EDIT..  : As johnsold suggested ... I just didn't included the MAX search in the second search result..  so still some homework to do

I have to read all poist completly before start wirering 😄

 

 

first with a bigger width , cut out a portion around these points and search again ...

find main peaksBD.png

find main peaks.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(5,137 Views)