A single straight line converts a raw signal to engineering units beautifully, as long as the relationship really is a straight line. When it is not, because a sensor is nonlinear or a tank's cross-section changes with height, a piecewise linear table steps in: a list of X-Y breakpoints with straight-line interpolation between them that traces a curved relationship in short segments. This guide explains how a breakpoint table works, how it handles a nonlinear sensor or a tank strapping table, how it differs from a single linear scale, and the trade-off between accuracy and the number of breakpoints.
Piecewise linear table in one line: A piecewise linear scaling table converts a raw signal or an input value to an output value using a list of X-Y breakpoints and linear interpolation between adjacent points, so a curved relationship is approximated by a series of short straight segments. It handles nonlinear cases a single line cannot, such as a tank strapping table converting level to volume, by picking the segment the input falls in and interpolating within it. More breakpoints follow the curve more closely at the cost of a larger table.
A piecewise linear table is a list of paired values: for each of several input points, the output value that corresponds to it. The input points, the X values, are chosen along the range of the signal, and each has a matching output, its Y value. Between any two adjacent breakpoints the table assumes a straight line, so the whole relationship is a chain of straight segments joined end to end. Where a single linear scale is one line across the entire range, a piecewise table is many short lines, each valid only between its two breakpoints, which together bend to follow a curve.
Converting a value has two steps. First the controller finds which segment the input falls into, the pair of breakpoints that bracket it, by locating the largest X value at or below the input and the next X value above it. Then it interpolates linearly within that segment: it works out how far along the segment the input sits as a fraction, and applies that same fraction to the gap between the two output values, adding the result to the lower output. The answer is the point on the straight line between those two breakpoints, so within each segment the math is exactly the two-point line used in ordinary linear scaling.
The breakpoints must be ordered along the input axis for the segment search to work, and the input should stay within the range the table covers. Below the first breakpoint or above the last, there is no segment to interpolate in, so the table typically either clamps to the nearest endpoint or extrapolates along the outermost segment, and which it does matters at the extremes of the range. Inside the table, the quality of the result depends entirely on how well the straight segments match the true curve, which comes down to where and how many breakpoints are placed.
The classic use of a piecewise linear table is a tank strapping table, which converts a measured level to a volume. In a vertical cylindrical tank the relationship is nearly linear, but in a horizontal cylinder, a sphere, or a tank with a dished or coned bottom, the cross-sectional area changes with height, so a given rise in level adds a different volume near the bottom, the middle, and the top. A single linear scale cannot capture that, but a strapping table can: it lists volume against level at many heights, measured or computed from the tank geometry, and interpolates between them, so the reported volume follows the tank's real shape.
The same approach fits any input-to-output relationship that curves in a way a single line cannot follow but that is smooth enough to approximate with segments. A sensor whose output bends gently across its range, a flow element with a known nonlinear characteristic, or any measurement where a table of measured or calibrated point pairs is available, can all be handled this way. The table does not need a formula for the curve; it only needs enough point pairs to outline its shape, which is why strapping tables built from physical tank measurements are such a natural fit, the points come straight from the survey.
This is where a piecewise table earns its place over a single linear scale. A single line is correct only if the relationship truly is straight, and applied to a curved relationship it is right at the two endpoints and progressively wrong in between, bulging away from the curve in the middle. A piecewise table pins the relationship down at every breakpoint and only approximates between them, so its error is confined to the small deviation of each straight segment from the true curve, which is far smaller than one line trying to span the whole bend. For a tank of any non-trivial shape, the difference between a strapping table and a single linear scale is the difference between a believable volume and a systematically wrong one.
The accuracy of a piecewise linear table is governed by how closely its straight segments hug the true curve, and that is set by the number and placement of breakpoints. More breakpoints mean shorter segments, and shorter segments deviate less from a curve, so adding points reduces the interpolation error. But there are diminishing returns and a cost: a larger table takes more memory and more configuration, and every breakpoint is a value that must be entered correctly, so a very large table is more work to build and to keep right. The art is to place breakpoints where the curve bends most sharply, densely through the tight bends and sparsely across the near-straight stretches, rather than spreading them evenly.
It is worth distinguishing piecewise linear interpolation in a scaling table from the interpolation a historian does between stored samples. A scaling table interpolates along a fixed, calibrated relationship between an input and an output, the same curve every time, defined once from geometry or calibration. Historian interpolation fills the gap between two time-stamped samples of a changing signal, estimating what the value was between recorded points in time. One is a spatial or characteristic curve that does not change; the other is a reconstruction across time of a signal that does. They both draw straight lines between points, but they answer completely different questions.
In a cloud SCADA architecture such as Merobix, the level-to-volume conversion for a shaped tank normally happens at the edge device or is applied to the level as it is brought in, and the platform carries the resulting volume as an engineering value along with the level it came from. Keeping both the raw level and the computed volume visible lets an analyst confirm the strapping table is behaving: if the reported volume does not track the tank's known shape as the level moves through the bends, the table's breakpoints are the suspect. Because a strapping table is a piece of per-tank configuration, storing it as explicit, auditable metadata, and being able to see the input and output together, is what keeps a tank's volume reading honest across the fleet and makes it straightforward to check when a tank is re-surveyed or re-ranged.
It stores a list of X-Y breakpoints and assumes a straight line between each adjacent pair, so a curved relationship becomes a chain of short segments. To convert a value, the controller finds the two breakpoints that bracket the input, works out how far along that segment the input sits as a fraction, and applies the same fraction to the gap between the two output values. The result is the point on the straight line between those breakpoints, so each segment uses the ordinary two-point line.
Because a tank whose cross-section changes with height, such as a horizontal cylinder, a sphere, or a tank with a dished bottom, has a curved level-to-volume relationship that a single straight line cannot follow. A single line would be right only at the endpoints and wrong in between. A strapping table lists volume against level at many heights from the tank's real geometry and interpolates between them, so the reported volume follows the tank's actual shape instead of a systematically wrong straight-line estimate.
Enough that the straight segments hug the true curve closely, with more points placed where the curve bends most sharply and fewer across near-straight stretches. Adding breakpoints shortens each segment and reduces interpolation error, but with diminishing returns and at the cost of a larger table that is more work to configure and maintain. The goal is to concentrate breakpoints in the tight bends rather than spreading them evenly across the range.
Merobix reads your field devices into a cloud SCADA - the real thing behind these terms, live in days from any browser.