From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Analysis - Finding Trigger Points

I've been working on this for a while now and I think I've reached the end of my ability to proceed alone. I have to analyze a waveform and use its shape to determine when certain things have taken place during a test. Essentially I need to identify all the major inflection points. Some images are attached to illustrate this.

 

I think I have it about 80% figured out but I'd like to make it as error resistant as possible. You'll notice in sample 5 in the attached vi, there's some grunge that I'm finding difficult to remove without also destroying the rest of the data. Open to any and all suggestions.

Download All
0 Kudos
Message 1 of 7
(2,282 Views)

Hi Dave,

 

I opened your VI and couldn't quite understand what exactly is the issue you are having right now. Is it that there are more peaks identified that the ones you'd want? You talked about having some grunge on your data from sample 5, are the other samples giving the results you want? What exactly do you want to remove? The excess peaks found by the peak_detector.vi?

 

Regards,

Enrique

0 Kudos
Message 2 of 7
(2,225 Views)

Hi Enrique,

 

Ideally only four circles should be found on the plot, like in the attached images. Each circle is intended to mark a specific point where the plot bends, eventually yielding a "cup" shape. I guess it is the excess peaks that I want to remove but the threshold is about as low as it can go before it starts dropping good peaks.

 

Here is a sketch of an ideal waveform. In fact, if I could reduce the complexity of these analog plots to resemble something like this, it would be a whole lot easier.

0 Kudos
Message 3 of 7
(2,220 Views)

Hi Dave,

 

After looking into your vi, there are some suggestions that may help you solve your issue. First, the input of the peak_finder.vi should be your signal of interest and not the second derivative of your signal. The vi will output an array of peaks or values, depending on what option you have selected. What I recommend you in order to obtain the 4 points of interest is to run your data through the peak_finder.vi and then sort the resulting array from maximum to minimum. After that, you could plot the first two elements of said array to obtain the peaks and then the other two elements for the valley array. I think this way from any signal you may had, you can find that "cup" form that you want.

 

Regards,

Enrique

0 Kudos
Message 4 of 7
(2,208 Views)

Thanks for the suggestion. Unfortunately the peaks are not always at the inflection points. Running peak find on the original waveform puts the markers at rather arbitrary positions relative to where they need to be.

 

However, while trying your suggestion, I realized that running peak detect on the original waveform, reconstituting that linearly, and then recombining that with the original waveform makes a pretty neat filter.

0 Kudos
Message 5 of 7
(2,200 Views)

Ok, I'm happy that you could work around something. If you want you can mark that last reply as a solution for anyone who might have the same issue. Happy to help! 

0 Kudos
Message 6 of 7
(2,195 Views)

I do appreciate your input by my problem remains unsolved. I will post a solution if I find one.

0 Kudos
Message 7 of 7
(2,184 Views)