BioDeviceHub

Sensor Sensitivity Calculator

Fit a sensor's calibration points to get its sensitivity (slope), offset and best-fit non-linearity as a percentage of full-scale output, with the deviation of each point.

Formula

output=S×input+offset\text{output} = S\times\text{input} + \text{offset}
sensitivity S=least-squares slope\text{sensitivity } S = \text{least-squares slope}
non-linearity=max⁡∣deviation∣full-scale output×100\text{non-linearity} = \dfrac{\max|\text{deviation}|}{\text{full-scale output}}\times 100
SS
sensitivity: output change per unit of input
offset\text{offset}
output at zero input

How it works

A sensor converts a physical quantity into an electrical one, and its sensitivity is how much the output changes per unit of input. A straight line fitted by least squares to the calibration points gives the sensitivity as the slope and the offset as the intercept.

No real sensor is perfectly linear. The largest distance of a point from the fitted line, as a share of the full-scale output, is the best-fit non-linearity. Datasheets may use other definitions, such as a line through the end points, which give different numbers from the same data.

Worked example

A pressure sensor reads 0.02, 1.03, 2.05, 3.04, 4.07 and 5.05 V at 0, 20, 40, 60, 80 and 100 units.

  1. Least-squares slope = 0.05037 V per unit; offset = 0.02476 V.
  2. The largest deviation from the line is 0.0156 V; the full-scale span is 5.03 V.

The sensitivity is 0.05037 V per unit and the non-linearity 0.31% of full scale.

These are the values the calculator opens with, so you can check its output against this example.

Assumptions

  • A nominally linear sensor, calibrated over its working range under constant conditions.
  • Accurate reference inputs.

Common mistakes

  • Extrapolating outside the calibrated range.
  • Comparing a best-fit non-linearity with an end-point one from a datasheet.
  • Ignoring temperature drift, hysteresis and repeatability, which need separate tests.

Related equipment

Service documentation, failure modes and parts for the instruments this calculation is used with.