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.
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?
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
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.