In a project on which I am working, I have a computationally expensive process to calculate a value for a given point in time. As I am working with RF data at approximately 16MHz, this would be impractical to calculate for each and every sample.
What I would like to do is to use spline interpolation between each true calculation, but I wish to do this without having the full series of calculated knots as there may be thousands if not millions.
Is there a best method of calculating splines for such a situation? I can persist the first and second derivatives at the end of the previous spline to constrain the current spline, but how would I best constrain the end point? Is it simply a case of taking n future samples and finding an n large enough to give an accurate ending derivative, whilst small enough for practical use?
It appears that I was coming from a far too ignorant position and hadn't (still haven't really) quite grasped the intricacies of cubic splines. Having played with some data, I have explored the practical output and found that I was over-thinking it.
Taking an arbitrary signal with a number of samples:
Then using Math.Net Numerics Cubic Spline interpolation in a few different ways I can compare the output. When zoomed in to the second local maxima, the subtle differences can be spotted.
As I iterated through the x values, I used n control points either side of the current sample to generate a cubic spline. I then used this spline to interpolate the region between this and the next sample, whereupon I switched to the next n samples. I also compared this with the result of using a single spline calculated from all control points.
Visually, I cannot distinguish between the results of interpolating using the entire series of data, or only 5 control points either side of the current sample (i.e. half of the total 20 samples). The interpolation with three control points either side of the current sample actually gives a better approximation to the original signal, whilst 1 control point either side differs considerably.
Overall, for the current problem with which I am faced, I believe proceeding with generating new splines with each sample, three ahead and three behind, should give me adequate quality. I shall sit down at some point in the future to try to get my head around the actual proof of how many are required.
(Apparently I can't yet post images, sorry for the links).