# What is sensor linearity?

29 June 2021

### Most analog output sensors have general specifications, such as linearity (or non-linearity), repeatability, and resolution, as well as environmental specifications like operating temperature or shock and vibration, and dynamic specifications like response or bandwidth. ##### (Image: Shutterstock)

All these specifications represent limits of error or sources of uncertainty, related to the sensor's output compared to its input. Many of these terms are fairly easy to understand by their wording alone, but linearity error or non-linearity is not in that category.

Definition of linearity error or non-linearity

Linearity, or more correctly, non-linearity, is a measure of the maximum deviation of the output of any sensor from a specified straight line. This is applied to the plot of the data points of the sensor's analog output, versus the input parameter being sensed (which is called the measurand), under constant environmental conditions. The more linear the sensor's output, the easier it is to calibrate and to minimise uncertainty in its output scaling. However, understanding a sensor's non-linearity specification requires understanding the nature of the reference straight line.

Reference straight line

There are several possible reference straight lines that could be utilised to express a sensor's linearity error. The optimum choice, based on statistics, would be a "best-fit line". But just what is the criterion for "best fit"? Both experience and statistics favour a line calculated by the "method of least squares", whereby the sum of the squares of the deviations from the desired line is mathematically minimised. Such a best-fit straight line (BFSL) is broadly used as a basis for a sensor's linearity error or non-linearity, not merely because it is statistically appropriate but also because it has been validated in real-world measurements.

Impact of other errors

Because the linearity error applies to the analog output of the sensing system, recognition must be given to other errors that can affect the output, besides sensor non-linearity. To comprehend fully what the linearity error specification actually means, several pre-conditions must apply to the measurement process...