LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Statistics Express VI not detecting peak correctly

Hey all,

 

I made a tremendous amount of progress in revising and editing the VIs I was tasked to overhaul. They are now more powerful and leaner than previous versions. However, there are still a few 'bugs" and issues that remain. The most pressing issue is one I will describe below and I will post PNG picture files to help you help me. Due to confidentiality reasons, I am not able to post the entire VI at this time. However, I can describe as clearly as possible the issues we are having.

 

Now, the three pics I posted below will have some overlap between them in terms of which individual sample load is shown in each pic. The overlap is necessary to clearly illustrate my points. What is shown is a sample run of 6 sample loads (that was all that was needed to show this issue we are having). In each waveform graph, there are two plots shown: the Green plot is the raw signal, the Red plot is the 100Hz Lowpassed filtered data. The cursors are tracking the peaks in the Red 100Hz filtered plot. Specifically, please pay attention to the Yellow horizontal cursor and the second peak (not counting the inrush spike). For some reason, the vertical bar for each cursor isn't showing up, but that is another minor bug. The indicators on the right of the graphs show those respective peaks' magnitudes and their X-axis time (milliseconds) locations from the 100Hz Red Plot.

 

  • Looking at Pic 1 (Waveform Graphs 1 to 3), we see that Graph 1 is of a completely normal sample load. There are two well defined peaks beyond the inrush spike and they are both captured correctly by the cursors. The correct magnitudes and time values are displayed for them.
    • Graph 2 in Pic 1 shows what we term a "semi-jammed" sample load. That is, the motor started pushing the sample into the device, encountered some resistance, enough resistance that caused it to attain its holding torque for about 100ms, and then it unjammed itself and completed the sample load. Now, one thing to note is that with this type of curve (of which Graphs 5 and 6 are more examples of), we do not usually see an incorrect 2nd peak capture. In this case, we did. Look at the ornage circle and arrow and then at the red highlited indicator for the second peak... Why did it miss the actual 2nd peak?? It picked up a point and magnitude slightly before the actual second peak....
    • Graph 3 in Pic 1 is an example of a curve shape that we frequently see that the 2nd peak is not picked up correctly by the Statistics Express VI... (we basically are using X-axis offsets to tell the stats vi where to look for each peak. We haven't had many issues with capturing the first peak, but have had some issues with finding the correct 2nd peak on abnormal load curves.....) As you can see, it should have captured the second peak at around 0.31 seconds......
  • Pic 2 (Waveform Graphs 2 to 4) is meant to show all three graphs in which the second peak was detected incorrectly..... Graph 4 is basically the same situation as Graph 3.... However, look at the time of max return torque indicators highlited in Red for all three of these curves!!! Why are they all exactly the same time relative to the start of the data collection???
  • Pic 3 (waveform graphs 4 to 6) is meant to show how even in two "near jam, semi jammed" scenarios (Graphs 5 and 6), the 2nd peak was located correctly!! The times and magnitudes line up correctly....

 

 

Smiley Surprised Smiley Sad

It seems like the VI has more trouble with smooth/nearly constant resistance to  sample loading scenarios versus near jam, semi jammed scenarios..... Why would that possibly be? The windowing in terms of X axis offsets is obviously the same for each curve and it can't possibly change during runtime... Why would all of the second peaks be detected normally for normal load curves (Graph 1), but then not be correct in curves that look like Graphs 3 and 4????? What could possibly be causing the displayed time of max returns for those abnormal load curves to be exactly the same????

 

 

Anyway, anyone who may have any suggestions or ideas for what I should check/change, please reply. I would certainly appreciate it as our resources here cannot seem to figure it out.

 

Thanks!

Message Edited by Fascinated by Electronics on 04-22-2010 01:00 PM
Message Edited by Fascinated by Electronics on 04-22-2010 01:01 PM
0 Kudos
Message 1 of 2
(3,078 Views)

I am not familiar with the Waveform Statistics Express.vi.  I have a Statistics Express.vi in my palette, but it does not have any peak detection funcationality in it - in any event, I have not used this express vi and can't offer any input on buggy-ness.

 

I have used the peak detector.vi and threshold detector.vi's (Signal Processing...Signal Operation palette) with good luck on a variety of signals where I need to find local maxima and minima, or edges.  You may want to try one of these vi's and tune them to your data to see if you get more accurate peak detection.  There are inputs on the vi's that will allow you to tune the behavior of the algorithm to your data.  If you would like to upload a waveform file with some troublesome data, I could take a look at it and see if I can detect the peaks you are looking for.

 

-cb

 

 

0 Kudos
Message 2 of 2
(3,031 Views)