Automation Glossary • Polynomial linearization

What Is Sensor Linearization With a Polynomial?

Merobix Engineering • • 7 min read

When a sensor's output does not rise in a straight line with the quantity it measures, the controller needs a way to bend the conversion to match. One way is a breakpoint table; another is to fit a smooth equation, most often a polynomial, to the sensor's response and evaluate that equation to turn raw signal into engineering units. This guide explains how polynomial linearization works, where the coefficients come from, where it is used, how it compares with a breakpoint table, and why a higher-order fit is not automatically a better one.

Back to Blog

Polynomial linearization in one line: Polynomial sensor linearization converts a nonlinear sensor's raw signal into a linear engineering value by evaluating a polynomial, an equation with terms in the raw value raised to successive powers, whose coefficients are chosen so the equation follows the sensor's true response. The coefficients come from fitting the polynomial to calibration data, pairs of known raw and true values. It is a smooth alternative to a breakpoint table, well suited to sensors with a continuous curved characteristic such as thermistors and custom transducers.

Fitting a Curve to a Nonlinear Sensor

Many sensors do not respond in a straight line. A thermistor's resistance falls steeply and nonlinearly as temperature rises; some transducers have a gently curving characteristic across their range. For these, mapping raw signal to engineering units with a single straight line would be right in one place and wrong elsewhere. Polynomial linearization replaces the straight line with a curved equation: the engineering value is computed as a constant plus a term proportional to the raw value, plus a term proportional to the raw value squared, and so on for as many powers as the fit needs. Each added power lets the curve bend more, so a well-chosen polynomial can trace the sensor's real characteristic closely.

Evaluating the polynomial is straightforward arithmetic the controller does every scan: take the raw value, form its powers, multiply each by its coefficient, and add the terms together. A first-order polynomial is just a straight line, the ordinary linear scale. A second-order, or quadratic, adds one bend; a third-order, or cubic, adds an inflection and can follow an S-shaped characteristic. The order chosen is the lowest that follows the sensor's shape well, because the whole point is to match the curve, not to add complexity for its own sake.

The strength of the polynomial approach is that it gives a single smooth equation covering the whole range, with no segments or breakpoints and no discontinuities in slope where segments meet. Where a sensor's nonlinearity is a smooth, continuous curve, a polynomial expresses it compactly, just a handful of coefficients, and evaluates cleanly. This makes it a natural fit for a controller that can do the multiply-and-add cheaply and prefers a small set of constants over a long table.

Where the Coefficients Come From

The coefficients are not guessed; they come from calibration data. To characterize a sensor, its output is recorded at a series of known reference conditions, giving pairs of raw value and true engineering value spread across the range. A curve fit then finds the coefficients of a polynomial that passes as closely as possible through those points, minimizing the overall deviation between the equation and the data. The result is a set of numbers, the coefficients, that when plugged into the polynomial reproduce the sensor's measured behavior. Those coefficients are then loaded into the controller, which uses the same equation to convert every raw reading thereafter.

For some sensor types the coefficients come ready-made from a published characterization rather than from fitting each device individually. Certain thermistors and other standard sensors have well-established equations with tabulated coefficients that describe the type's typical response, so a designer can use those directly. For a custom transducer or a device that must be matched precisely, a per-device calibration produces coefficients specific to that unit, which is more accurate but more work. Either way, the coefficients encode the relationship between raw signal and true value, and they are only as good as the calibration data or characterization behind them.

Because the coefficients are tied to a particular sensor, a particular range, and a particular set of conditions, they must travel with the point they belong to and be updated when the sensor is recalibrated or replaced. Coefficients left over from a previous sensor, or reused from a similar but different device, produce a smooth, plausible-looking curve that is nonetheless the wrong curve, mis-converting every reading in a way that responds sensibly to change and so hides easily. Keeping the coefficients matched to the actual sensor is the same discipline as keeping a linear scale matched to a transmitter's real range.

Polynomial Versus Table, Overfitting, and Linearization in Cloud SCADA

A polynomial and a breakpoint table solve the same problem, a nonlinear conversion, in different ways, and the choice between them is a real engineering decision. A polynomial is compact and smooth, a few coefficients with no slope discontinuities, and it suits a characteristic that is genuinely a smooth continuous curve. A breakpoint table makes no assumption about the shape of the curve, so it handles kinks, flat spots, and irregular characteristics that no low-order polynomial can follow, at the cost of storing many point pairs. For a smoothly bending thermistor a polynomial is elegant; for an irregular or empirically messy relationship a table is safer.

The trap unique to polynomials is overfitting. It is tempting to raise the order until the curve passes exactly through every calibration point, but a high-order polynomial forced through scattered data can wiggle wildly between the points, swinging far from the true value in the gaps even though it hits every calibration point dead on. A fit that is too flexible follows the noise in the calibration data rather than the underlying sensor characteristic, so it looks perfect at the calibrated points and misbehaves everywhere else. The discipline is to use the lowest order that follows the real shape, accept that the fit will not pass exactly through every noisy point, and check the equation's behavior between the calibration points, not just at them.

In a cloud SCADA architecture such as Merobix, a nonlinear sensor is normally linearized at the edge device or as the raw signal is brought in, so the platform carries the resulting engineering value along with the raw signal it was computed from. Keeping both visible lets an analyst confirm the linearization is behaving across the range, not merely at the reference points, which is exactly where an overfit polynomial or stale coefficients give themselves away. Because the coefficients are per-sensor configuration, storing them as explicit, auditable metadata and tying them to a calibration record keeps the conversion honest through recalibrations and sensor swaps, and having the raw and linearized values side by side makes it straightforward to catch a curve that has drifted away from the sensor it is supposed to describe.

Frequently Asked Questions

How does polynomial sensor linearization work?

It converts a nonlinear sensor's raw signal to an engineering value by evaluating a polynomial, an equation made of terms in the raw value raised to successive powers, each multiplied by a coefficient. The controller forms the powers of the raw value, multiplies by the coefficients, and sums the terms, every scan. A first-order polynomial is just a straight line; higher orders add bends so the equation can follow the sensor's curved characteristic closely.

Where do the polynomial coefficients come from?

From calibration data or a published characterization. The sensor's output is recorded at a series of known reference conditions, giving pairs of raw and true values, and a curve fit finds the coefficients of a polynomial that passes as closely as possible through those points. For some standard sensors, such as certain thermistors, established equations with tabulated coefficients exist and can be used directly; custom devices are fitted individually. The coefficients must be matched to the actual sensor and updated on recalibration.

When should you use a polynomial instead of a breakpoint table?

Use a polynomial when the sensor's characteristic is a smooth, continuous curve, because a few coefficients then express it compactly and evaluate without slope discontinuities. Use a breakpoint table when the relationship has kinks, flat spots, or an irregular shape that no low-order polynomial can follow, since a table makes no assumption about the curve. Beware overfitting with polynomials: a too-high order can wiggle wildly between calibration points even while hitting each one exactly.

From Definitions to a Live Dashboard

Merobix reads your field devices into a cloud SCADA - the real thing behind these terms, live in days from any browser.

Request a Free Demo +1 (903) 307-7300
More in Automation Glossary
Slew-rate limiter  •  Median filter  •  Gauge vs absolute pressure  •  Actual vs standard volume  •  Scaled frequency input  •  Resettable vs non-resettable totalizer  •  All Automation Glossary →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →