LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

detecting peaks in a waveform signal

Hi,

 

My aim is to detect points in a rectified and smoothed waveform signal where the instantaneous level rises significantly above a local average level.

 

When these points are detected, I would like to display them on a waveform graph so that the points can be checked against the original signal easily.

 

I have tried a number of approaches to this, but have not managed to create a local average that I can compare with the level of the waveform.

 

If anyone has any suggestions, they will be gratefully received.

 

Thanks

 

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

How about 'Waveform Peak Detection . VI'.

Search for it in your function palette.

 

It takes the signal as an input, then outputs:
Location (x-value)

Amplitude (y-value)

 

You could send those to any x-y graph to graph the peaks. 

 

It also outputs 2nd derivatives, which I guess is what you are looking for 

Message Edited by Cory K on 11-25-2008 12:28 PM
Cory K
0 Kudos
Message 2 of 6
(3,140 Views)

If the Waveform Peak Detection.vi does not work, please post  some data with an indication of the points you want to detect.

 

Lynn 

0 Kudos
Message 3 of 6
(3,136 Views)

Thanks for the quick reply.

 

If I use "waveform peak detection" is there any way I can average the previous N samples (where N = however many gives good results) of the waveform to feed this to the threshold input?

 

My aim is to find where the peaks are greatly above the surrounding level, up until this point I've only managed to compare them to a fixed value.

 

Thanks again 

0 Kudos
Message 4 of 6
(3,133 Views)

..... hmmm

I just found a function called 'Basic Averaged DC-RMS.vi'

 

I have never used it before, so I could be wrong, but it looks like it will do the trick.

You input:

- the signal

- averaging type

- window (which I'm assuming is a time span)

 

Then outputs:

- DC average

- RMS average

 

You could mess around with this function and see if it gives you what you are looking for.

Cory K
0 Kudos
Message 5 of 6
(3,123 Views)

The Locations output is related to the array index fir the data.  You should be able to use that to extract the N samples before the peak.  Unless the peak has a width of one sample, you may want to take N samples starting at Peak Location - 0.5*Width.

 

However, this technique depends on finding a peak before you take the average.  If your original threshold is wrong, it may not work.

 

You could scan through the waveform N samples at a time looking at the mean and the standard deviation.  When the standard deviation is small, that group of N samples are all close to the same value.  This may represent your baseline.

 

Does that baseline vary between peaks or is it the same throughout the dataset?

 

Lynn 

0 Kudos
Message 6 of 6
(3,121 Views)