LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smart peak detection

Hello,

I have signal of valve acceleration. My present task is to detect all important peaks for other calculation. At firs I tried to use derivative and look for points where it crosses zero (local extreme - relative extreme), but this is not useful because it detects all even the smallest one. I think about any kind of filtration but I don’t know any.

Does anybody know how to at least smooth the line to eliminate no important peaks? Or any other advices?

I marked all important peaks in signal (peaks2.png) and attached VI with the signal.

Thanks, I appreciate all comments.

LV 2011, Win7
Download All
0 Kudos
Message 1 of 16
(3,983 Views)
This problem is going to be difficult to tackle unless you define what an "important peak" is. Based on your figure I couldn't figure out why some peaks were being considered while others were not, so you must have some sort of criteria to say "this is an important peak".
0 Kudos
Message 2 of 16
(3,962 Views)
If you can determine the shortest duration between peaks, you can design a low-pass filter. Then use the "Waveform peak detection.vi". That's the basic idea.

Enrique
www.vartortech.com
0 Kudos
Message 3 of 16
(3,960 Views)
I know that this is very subjective. I want to chose these peaks that are big and "keen" (acute). In the light of these facts I changed the picture with the important peaks. In addition I care only about the peaks that are between 200 and 300 (x axis) and theit direction is up (peaks4.png).

My main problem is how to eliminate small deviation like in the picture peaks4 - with red colour is highlight area, that is considered to be one peak. But when using derivative it will find many small extrems.
Thanks for all ideas.

Message Edited by ceties on 02-21-2006 03:01 AM

LV 2011, Win7
Download All
0 Kudos
Message 4 of 16
(3,947 Views)
Hi Enrique,
I'm now trying your soulution, when you have some other advices I'll be glad.

Edit: problem with the vi you mensioned is that it finds all peaks that are higher than some bound but it finds small deviations too. Change width is not useful because I haven't got enough points and it eliminates peaks that are important (one point up and one down is for me peak but when width is 5 it eliminates it and when width is smaller than 5 it finds small deviations too).
Solution is maybe to use spline between all points and then resample the signal to obtain more points.... I'll try

Message Edited by ceties on 02-21-2006 03:26 AM

LV 2011, Win7
0 Kudos
Message 5 of 16
(3,945 Views)

Hi

I once had a similar problem - what helped me was this:

I tried to formulate what the specific peaks defined very precisely. This formulation was then "translated" to LV.

Just as an example - when you can say that the peaks must be between 150 and 170 (y-axis), you already can eliminate lots of them.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 6 of 16
(3,938 Views)

Hi

Have you tried playing around with the example Peak Detection and Display. I have modified the example (LV8.0) to use your data and it seems to work quite well. Have a look and see what you think

have fun

David

 

0 Kudos
Message 7 of 16
(3,910 Views)
Hi David,
can you pls save the VI in LV7.1.
Thanks a lot
LV 2011, Win7
0 Kudos
Message 8 of 16
(3,900 Views)
0 Kudos
Message 9 of 16
(3,892 Views)
I had also initially tried the Peak Detection VI, but it doesn't really work given his dataset and the original picture he posted. To which: OK now I'm confused as to what you're considering a peak. In the original picture you had identified peaks (as circled in blue) at around 25, 50, 80, 90, 130, 155, 170, 190, 200, 230, and the additional ones where those spikes were after around 235. Then in a follow-up post you said that you were looking for peaks that were (a) "keen", (b) between 200 and 300 on the x-axis, and (c) up. You then posted a new picture (peaks5.png) identifiying peaks (circled in blue) at 25, 45, 75, 95, 220, 235, ... (the rest being the peaks in the multple spikes). You also said you wanted to eliminate small deviations (unclear what this means) and provided a figure in which this really big thing with a bunch of bumps along the way was really one peak. OK, so then why are you identifying the ones at 25, 45, 75, 95 in peaks5.png as peaks? And if those are peaks, why wouldn't the one at around 130 be one? Or the one that's around 160?

You can use the Peak Detection VI with a large width to identify those "large" peaks like in your second peaks4.png by using a large width. However, that won't identify the peaks from your rapid transitions that seem to occur after 235. So, you should probably consider splitting your data up and analyze portions separately because I don't believe that a single algorithm will work for the entire waveform given your loose definition of a peak.
0 Kudos
Message 10 of 16
(3,876 Views)