I've written a derivative filter that fits the best straight line to a subarray of data centered about each point in the input array. I have a Point-to-Point version and a version which requires that the entire data array be input. It works as follows.
For each point in the input data array, 2*Rank+1 points are extracted to a subarray as follows. Rank points are extracted before the point, the point is extracted, and Rank points after the point. These 2*Rank+1 points are concatenated and input to the LV Linear Regression function to calculate the slope at each point in the input array. At the beginning and end of the array there are not enough points to do this, so the Rank is automatically reduced from so the derivative can be calculated (although with reduced Rank). One benefit of this method is that the points do not have to be spaced regularly in time. The VI accepts 2 input arrays, one is the value and the other is the corresponding timestamp. This works quite well and you can adjust the Rank to get the desired filtering. I will share these programs with anyone interested. Lewis Drake Process Automation Corporation Belle Mead, NJ 908 359-1011 www.processauto.com