Creating and using calibration factors

184 Views Asked by At

Perhaps simple question, but I (the simple) need some guidance. The following applies to a project ongoing and is a challenge in that I am not a math whiz!

As example, I wish to measure temperature through a sensor whose resistance changes with temperature. It is a non-linear sensor. It's easy to create a calibration table which provides two columns, the Actual Temperature and the Resistance Result. As I am interested in 0-10 Degrees C, my table might consist of three rows:

Temperature    Resistance 
__________________________
0 Degrees C    100.4 Ohms
5 Degrees C    110.8 Ohms
10 Degrees C   140.2 Ohms

So I have taken three measurements at the bottom, middle, and top of my range.

Now, if I were to plot this, we'd see quite a jump between 5 and 10 C, as the device is not linear.

If under actual conditions I then read 102.0 Ohms, what might the best method be to determine the Temperature at the given resistance? What about at 115.3 Ohms? Same method?

Of course, I could say that between 0 and 5 C we have 2.08 Ohms per Degree C, and between 5 and 10 we have 5.88 Ohms per Degree C. I bet there's a better method that will fit to a curve.

As the higher range is wild, I might have to take a few more calibration steps between these values to get more data. Seems reasonable. But what then? Must I store this table and apply a Ohms per Degree factor if the value is within a particular calibration step range?

Maybe this a good place for the use of a polynomial equation, but I am a bit green here. Please help with an example as I best learn by that method. I'm hoping for the best "curve fit" without too much math processing overhead.

Thank you!

1

There are 1 best solutions below

7
On

You could look into polynomial fitting methods, but they will each have their own set of problems.

This could be made worse by more data points, by nonlinear behaviors and a host of other things, so you'll get different mileage.

For the particular example you gave, I used Wolfram Alpha and it provided two approaches that include a linear and periodic approach.

If it could have done a least-squares fit, it would have provided that too.

So you can see, not too good. You could try adding another handful of data points and see if it improves things.

I am surprised you can not get the data sheet and see if they provide a temperature based model for this sort of thing.