1
$\begingroup$

I'm writing some code for a pressure level sensor for propane tanks. The manual provides me with the following table with the caption:

"Best accuracy will be obtained using the calibration data in the table below:"

Table of values

I assume: 0.000 - 0.318 is a E-stop 0.319 - 0.590 is 10 etc.

What I'd like to find out is how can I calculate the exact Graduation from a specific voltage. For example if I get 0.45 volts, what is the exact Graduation?

I'd much appreciate being told what type of problem this is and suggestions for formulas.

(I've cast the tagging net very wide. If someone could point me in the right direction to tag that would be great)

  • 1
    The keyword you're looking for is *interpolation*. http://en.wikipedia.org/wiki/Interpolation2012-07-09
  • 1
    Wolframalpha can [generate the formula for you](http://www.wolframalpha.com/input/?i=interpolate+%7B%7B0.318%2C0%7D%2C%7B0.59%2C10%7D%2C%7B1.087%2C20%7D%2C%7B1.475%2C30%7D%2C%7B1.965%2C40%7D%2C%7B2.505%2C50%7D%2C%7B3.072%2C60%7D%2C%7B3.556%2C70%7D%2C%7B4.004%2C80%7D%7D). Just plug in your voltage as $x$ and it'll give you the graduation.2012-07-09
  • 0
    Both comments have lead me down the right path. @davin since you answered first would you mind making an answer so I can mark it as correct?2012-07-09
  • 0
    Since the relationship is almost linear, you might try a simple [linear regression](http://en.wikipedia.org/wiki/Linear_regression), which can be done in Excel or a similar program. Actually, it looks like [wolframalpha does it too](http://www.wolframalpha.com/input/?i=linear+regression+%7B%7B0.318%2C0%7D%2C%7B0.59%2C10%7D%2C%7B1.087%2C20%7D%2C%7B1.475%2C30%7D%2C%7B1.965%2C40%7D%2C%7B2.505%2C50%7D%2C%7B3.072%2C60%7D%2C%7B3.556%2C70%7D%2C%7B4.004%2C80%7D%7D).2012-07-10

1 Answers 1

1

The keyword you're looking for is interpolation.