10-22-2014 07:47 AM
Hello friends,
I want to find second derivative using Savitzky golay filter for the data as shown in image.
Three different spacings are used.
Can some one help me to understand to to decide side points and polynomial order for my input data.?
Thanks in advance.
10-22-2014 06:10 PM
The polynomial order must be at least one larger than the highest derivative. So a third order polynomial is required for a second deriviative. In general it is better to keep the polynomial order as low as possible while getting a good fit to the data.
The number of side points is somewhat arbitrary and depends on how much smoothing is needed. Often some experimentation and judgement is required.
Have you considered resampling the data to create a new dataset with uniform sampling throughout? That might be easier than trying to match derivatives at the transition points.There are several resampling VIs available.
How many data points do you have in each segment?
Lynn
10-23-2014 02:38 AM
Thank you very much Lynn.
Total no of data points are not fixed ,varying always.
Its in range of 520-570.
Eg When Toatal point= 517
10-24-2014 08:24 AM
With the data sets that small I think I would try resamplng first.
Lynn
10-27-2014 05:02 PM - edited 10-27-2014 05:04 PM
Hi Lynn,
I did resampling and applied Savitzky golay coefficients. And plotted same graph as in previous image.
I found peaks for prevoius image for both with and without Savitzky golay filter coefficients.
After comparision i found 1% (50-60Hz)change in frequency which is not affordable in my application.
So , now finding derivative without Savitzky golay filter coefficients.
Thank you for your support.