LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

peak detection

Hello Everyone!!!

I have a signal with multiple peaks. I am interested to find the location of 1st and 2nd highest peak only. 

Can anyone please help. 

I have applied a derivative method then savitzky-Golay filter and then peak detection method on my input signal but i am getting many locations. 

I only want 2 highest locations.

Attach is the screenshot of my VI and Front panel diagram.

Thanks,

Download All
0 Kudos
Message 1 of 4
(1,034 Views)

Here is an idea ...

just sort the results by amplitude and pick the first two ...

Adding the bells ( at least two peaks? ) is your homework 😉

 

Why not posting the data? (Or a vi including the data ? Hint: Edit: Make current values default 😉 )

 

sort peaks by amplitude.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 2 of 4
(998 Views)

Thank you for your reply and suggestion.

But.. it didn't work for me. The method u suggested gives me highest value 10.70 and 2nd highest value 10.64. but on actual the second highest peak is on 15.53. i am interested in peak values where slope is zero not the side points.

can u suggest me other approach?

Thank you  

0 Kudos
Message 3 of 4
(969 Views)

First you should read the help files of the vis you are using 😉

peak search uses a fit approach and the parameters have influence on the result...

 

after you have a good guess of the two max peak positions, you can cut out an area around it and look for the maximum..

 

here I made something similar

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 4 of 4
(958 Views)