Cubic Spline Interpolator

This isn't a question; I'm putting this here as a reference so I can find i t in the future. This is how to build a cubic interpolator circuit that ta kes four samples and interpolates a sample between the middle two.

Given four samples, y0, y1, y2, y3, sampled with period T=1 at (arbitrary ) times t={-1,0,1,2}, and given mu, where 0

Reply to
Kevin Neilson
Loading thread data ...

This might seem a minor quibble, but that is not a cubic spline interpolation - it is just a plain cubic curve fit and interpolation. A cubic spline is made when you have more sample points and you put together a step-wise cubic function consisting of multiple cubic parts joined together. Implementing cubic splines involves quite a bit more maths (it depends on the type of cubic spline - there are many) - making an efficient FPGA implementation could be a fun way to spend a rainy day.

Reply to
David Brown

Should be easy, it's 10 lines in Java:

formatting link

--
Frank Buss, http://www.frank-buss.de 
electronics and more: http://www.youtube.com/user/frankbuss
Reply to
Frank Buss

Super! Mann zieht die Stuetzpunkte mit der Maus! That is a nice applet, but it's parametric, so it seems a little different than my application. I have a function of only one variable. -Kevin

Reply to
Kevin Neilson

Thanks; that is a good clarification. I just need to interpolate a point g iven four surrounding points so I guess I don't need the whole spline imple mentation. There is a wealth of information on the web about interpolation but it's difficult to find the simple extracted formula I have above. I s uppose most implementations are, like you say, not well-designed for FPGAs.

Reply to
Kevin Neilson

it's parametric,

one variable.

The class Spline.java is a spline of only one variable. Test.java uses it twice, for the x and y coordinate of the points.

Your example for x=-1,0,1,2 could be implemented by creating a Spline object and initializing it with the y-samples. Then call fn, with 0, 1,

2, 3 and use t for interpolating between two points.
--
Frank Buss, http://www.frank-buss.de 
electronics and more: http://www.youtube.com/user/frankbuss
Reply to
Frank Buss

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.