LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced peak detector

Hello!!

I am trying to use the advanced peak detector example, that I have found in Labview. But I have a question.

If I have my own signal from a ECG (electrocardiogram) that is shown in a waveform chart, but i dont know what I have to chance in this example yo use my signal instead of the signal that this example provide (a sinus signal).

outside of the while loop there are two kinds of arrays that I dont know what are it for.

Could anybody help me.

Thank you
0 Kudos
Message 1 of 2
(2,723 Views)
Hello,

I'm not sure I understood completely your question.
The example you mentioned is making some peak detection in a waveform, that in the case is a sine wave. To use it in your own signal, you must take care about the following:
- First, this is a point-by-point peak detection, it cannot wire there an array and expect the results from the peak detection of that array, but you mentioned that your data is being displayed in a waveform chart, so I think this ois ok for you.
- You have to take care for the values in width ant threshold, thershold is easy - your peaks must have an amplitude bigger than that value to be detected (try changing it to 12 in the example - no peak will be found). Width is the minor peak width it will detect - this can be used to avoid that some noise will be interpreted as a peak (try changing it to 100 in the example - no peak will be found).
- The arrays that the function is returning are: Peak locations (the index of the peak in your data), Amplitudes (The amplitude of the peak) and 2nd derivatives (the value of the second derivative of the signal at that peak point).
The arrays you mentionning out of the while loop are just some treatment to display the peaks in the XY graph (you see some red squares in the graph).
So if you want to search for the location of the peaks just look at the peak locations array.
If you're looking for peak amplitudes look at the amplitudes array.
If you're looking for number of peaks found, look at the #found indicator.

Hope this helps,
Paulo
0 Kudos
Message 2 of 2
(2,718 Views)