Skip to main content
1-Visitor
June 21, 2019
Solved

data set differentiation

  • June 21, 2019
  • 3 replies
  • 5333 views

Hello,

I'm trying to take the first and second derivative of my data set (frequency vs temperature). I've used the standard method to define a function via cspline- interpolation and take the derivatives. However, from the attached worksheet, it is seen that the plot of the derivatives have peculiar behavior and I'm afraid the result may not be reliable.

Could anyone make a suggestion on this issue, please?

 

Thank you in advance,

Payman 

Best answer by AlanStevens

Looks to me like a simple quadratic fits pretty well - see attached.

 

Alan

3 replies

23-Emerald IV
June 21, 2019

Can't see all of your sheet. This is what I get with brute force differentiation:

LM_20190621_Differentiate.png

I wonder if it would be better to approximate the curve with a mathematical expression (part of a parabola?) and then do the differentiation on that model...

Success!
Luc

payman1-VisitorAuthor
1-Visitor
June 21, 2019

Thank you, Luc.

Do you know why the cspline routine produces the spikes on the first derivative? I tried also with a higher number of data points and get the same issue.

23-Emerald IV
June 21, 2019

As far as I know (regarding splines not much) spline routines just try to find a curve that nicely passes through all your data points. If you have a couple of 'funny' points, they will be included in the curve (Note that DJF's graphs appear to show these funny points!). So I guess there's no difference when you use spline curves or the raw data to calculate a derivative.

Modelling the behaviour with a mathematical function (as Alan reportedly did) will get rid of any funny points.

 

Maybe it's worth-wile to investigate how the funny points got in: was it the oven switching in or out?. If you remeasure the curve, do you get spikes at the same temperatures?

 

Success!
Luc

19-Tanzanite
June 21, 2019

Looks to me like a simple quadratic fits pretty well - see attached.

 

Alan

payman1-VisitorAuthor
1-Visitor
June 21, 2019

Thank you, Alan.

Using the regress routine produces smooth results in both the first and second derivatives. It looks more reliable than cspline routine.  

16-Pearl
June 21, 2019

Here's a b-spline solution (prime 5 and pdf).