I have finite series of intervals of real numbers, Ri = (Rimin, Rimax) and series of real numbers ti, i=1..N.
My goal is to find a function f:R->R, where for each i is f(ti) in interval Ri.
In following image on X axis are ti values under each red line, which correspond to intervals Ri and green line is one of the possible solutions (in this case constant).
I know that I need the function f to be continuous and differentiable to at least third degree and it also should be "as smooth as possible". When it is possible to be linear, it should be. I thought of solution where I would fit middle-points of intervals with some spline, but that will bring problems with over-fitting and it is clear that the function could be "smoother" in some sense, though i don't have exact metric for that. In my example image it will create a clearly bad solution and this will be the case even if no linear solution exists.
I know that this "smoothness" criteria is somehow vague. Function f will be a movement of machine in one axis in time, so I need it to move as little as possible without any jumps or rapid velocity changes, but I don't want to define this too precisely, as it would narrow down possible approaches.
I have never encountered a similar problem neither in work nor during my studies and i don't know whether it has some standard name which i could google and research further. I tried to search for descriptions and keywords of my problem, but with no success.
I don't know if it is question for SO or MO, but i need to create an algorithm for finding function f so I am posting it here.
Any help will be much appreciated.
Matej