[Math] Interpolation method that does never overshoot

interpolationspline

To implement a system that will control hardware, I need an interpolation between points on a graph that does never overshoot.
By overshooting I mean that between two points there may be no y-result that has a higher value than either of thew two points.

First I thought that "monotone cubic interpolation" might be what I need, however after implementation I found that this isn't always the case. After researching, I found that this only reduces overshooting, doesn't prevent it entirely. That can also be seen here, I think: Implementation of Monotone Cubic Interpolation )

So what other algorithms/formulas could fulfill this requirement?

Best Answer

If you can do without the 'strict' interpolation criterion (saying that the curve must pass precisely through the knot points), you can use a b-spline without prefiltering - simply use the knot points you have as the spline's coefficients. The b-spline is bound to the convex hull of it's coefficients, so it can't overshoot the range if it's coefficients aren't ever out-of-bounds. But omitting the prefilter will 'spoil' the interpolation criterion, and the resulting curve will not pass exactly through your data points - it will appear slightly 'smoothed'. Oftentimes, though, this is quite acceptable, and it will never overshoot.

Related Question