02-11-2004 04:22 AM
02-11-2004 09:24 AM
02-12-2004 12:26 AM
02-12-2004 10:52 AM
02-15-2010 06:00 PM
What happens when you use Derivative x(t) in series to calculate second derivative.
I am getting strange answers. How to initialise in this instance? Is there a better way of performing second derivative?
I have used "nth Derivative of Polynomial.VI". It has no inital condition inputs.
What is the correct way?
02-15-2010 06:19 PM
Did you realize that this thread is 5 years old? 😮
Taking the second derivative can be very noisy, so you would also need some filtering. How does the data look like?
If you can fit it well with a polynomial, you could use "nth Derivative of Polynomial.VI" on the resulting coefficients to generate the coefficients for the nth derivative polynomial. Apply your x-values and the new coefficients to "polynomial evaluation" to generate the curve for the second derivative (You don't even need equal spacing in x).
Can you show us some example data?
02-16-2010 01:01 AM
Yep I knew it was an old thread.
An example of actual measured data is:
a = pa = 2.5 320 5 245 7.5 182 10 162 12.5 168 15 152 |
Typically though there will be around twice the number of datapoints.
It appears that the Savitzky-Golay 2nd derivative operation is discontinuous at the start and end points.
How do you get around this?
11-04-2015 07:52 AM
Was a technique found for this? I am having the same problem. The first derviative looks good and even better when I filter, but when I take the second derivative the plot looks horrible and not as expected. I have basically a Gaussian peak that I need to take the 2nd derivative of. The polynomial solution doesn't fit well.
11-04-2015 07:57 AM
11-04-2015 09:26 AM
GerdW,
I did indeed read the thread. Its kind of insulting to assume I did not.
The suggestions made in this thread were pretty basic and obvious. I already have evenly spaced data so no need to fit using the spline interpolation method. Secondly, I have a Gaussian peak, so taking the derivative using the nth Derivative of Polynomial.VI doesn't yield the results I expect based on publications for peak identiciation in high pressure liquid chromatography. Lastly, I don't feel it necessary to attach a VI of an evenly spaced array being fed into the Derivative x(t) VI with and without various filter VIs attached. The real crux of the issue is that several of us have had issue with LabVIEW's Derivative x(t) VI giving unexpected results when used to find the 2nd derivative. Has anyone found a better solution?