07-22-2013 02:44 PM
I am trying to create an algorithm that can scan through extend retract data and determine the point when snubbing starts (Velocity Slows).
Example:
The application is a hydraulic actuator and I'm monitoring extend/retract position data versus time. The alogrithm can run post process to determine snubbing times.
The current algorithm I use takes the position data and filters it to reduce noise. Than it takes the mode of the data. The assumption is the mode would be located in the constant velocity region because the snubbing area is very small. I then use the mode number to scan the data from beginning to end until I find the value that starts to decrease. This point should be the snubbing start. I already have extend/retract time algorithm that is reliable. I use the extend/retract time and subtract the snubbing point to get the snubbing time. The problem is if the signal becomes noisy the mode number becomes unreliable and the point when it starts to decrease becomes a problem.
I am looking for a more mathematical approach for finding the snubbing start. I am not a signal analysis guy so I was wondering if someone had a different more reliable approach to finding these types of regions on a plot.
07-22-2013 03:03 PM
I might try fitting straight lines to the two horizontal sections. You may be able to do this without any prefiltering. Then look for the places where the data is removed from that line by 2 or 3 times the standard deviation of the noise. These will likely be close to your snubbing start or end points. For finer resolution of the transistion points you could fit straight lines or other suitable curves to the snubbing region and look for the intersection of the horizontal lines with the more steeply sloped lines.
Also consider a median filter or Savitsky-Golay smoothing in place of the filters you may now be using. Both can help with noisy data.
Can you post a real dataset with the points marked where the snubbing starts and ends?
Lynn
07-22-2013 03:09 PM
Why don't you take a derivative of the signal. If the derivative of the signal remains negative a certain amount of time then it look like you have a snub. To help filter the noise, you can take a second derivative and use it to help determine if you have lots of noise or settling down (should be near 0).
07-22-2013 03:13 PM
The derivative might be worth a try, but I suspect that the derivative of the noise will be bigger than the derivative of the slope during snubbing. I have never had much luck using derivatives for finding inflection points on noisy signals.
Lynn
07-22-2013 03:29 PM
That is the reason I suggest the 2nd derivative. It looks like your snub is linear, hence the second derivative should be near 0.
07-23-2013 03:42 PM
Here is two sets of extend and retract data. I will try both suggestions and see if it works.
Thanks,
07-23-2013 04:05 PM
Your data did not get attached. Please try again.
Lynn
07-23-2013 05:59 PM
Sorry...I think this is correct
07-23-2013 06:45 PM
If you want the snubbing start and end times as indicated by your original post, a simple thresold comparison on the velocity data will work. If you are trying to locate the points indicated by the arrows on your Data VI, that is somewhat more of a challenge.
Here is a way to get the points where the position leaves the fixed endpoints.
Lynn
07-24-2013 10:39 AM
This is a great example of how to find the end of snubbing. I like your approach!
The plot may or may not be the same everytime. Based on that I need a robust approach to always find the snubbing time not assuming it will be the same plot everytime. Wouldn't a threshold comparison approach assume the plot is within a window andonly report if it fell above or below that window?
Not sure I understand the threshold comparison idea.