Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
kvalobs:kvoss:system:qc2:requirements:algorithms:akima_splines [2010-04-15 15:24:37] gabrielk sub og sup, uferdig |
kvalobs:kvoss:system:qc2:requirements:algorithms:akima_splines [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Akima algorithm ====== | ====== Akima algorithm ====== | ||
- | The approach uses a cubic fit between the data points, so the slope is required at each data | + | You are given a single independent variable x. The approach uses a cubic fit between the data points, so the slope is required at each data |
point in addition to the value of the point itself. The interpolating polynomial is written | point in addition to the value of the point itself. The interpolating polynomial is written | ||
between the ith and i + 1st data points as: | between the ith and i + 1st data points as: | ||
- | y = a< | + | y = a< |
with coefficients defined by | with coefficients defined by | ||
Line 19: | Line 19: | ||
and, | and, | ||
- | m< | + | m< |
which is the slope of the line segment passing through the points. | which is the slope of the line segment passing through the points. | ||
The method of determining the derivatives, | The method of determining the derivatives, | ||
- | y< | + | y< |
- | wk | + | |
- | where f0k is the computed derivative at Pi of a third-order polynomial passing through | + | where f< |
three other nearby points: | three other nearby points: | ||
- | f01 = F (Pi−3, Pi−2, Pi−1, Pi) (16) | + | f< |
- | f02 = F (Pi−2, Pi−1, Pi, Pi+1) (17) | + | f< |
- | f03 = F (Pi−1, Pi, Pi+1, Pi+2) (18) | + | f< |
- | f04 = F (Pi, Pi+1, Pi+2, Pi+3) . (19) | + | f< |
- | The weights are inversely proportional to the product of what Akima calls a volatility measure | + | The weights are inversely proportional to the product of what Akima calls a volatility measure and a distance measure, |
- | and a distance measure, | + | |
- | wk = | + | w< |
- | 1 | + | |
- | vkdk | + | |
- | . | + | |
- | The distance factor is the sum of squares of the distance from Pi and the other three points: | + | The distance factor is the sum of squares of the distance from P< |
- | d1 = (xi−3 − xi)2 + (xi−2 − xi)2 + (xi−1 − xi)2 | + | d< |
- | d2 = (xi−2 − xi)2 + (xi−1 − xi)2 + (xi+1 − xi)2 | + | d< |
- | d3 = (xi−1 − xi)2 + (xi+1 − xi)2 + (xi+2 − xi)2 | + | d< |
- | d4 = (xi+1 − xi)2 + (xi+2 − xi)2 + (xi+3 − xi)2 . | + | d< |
- | The volatility factor, | + | The volatility factor, |
- | four points. | + | four points. (the same sets of four points appearing in Equations 4 through 7). |
H. Akima. A method of univariate interpolation that has the accuracy of a third-degree | H. Akima. A method of univariate interpolation that has the accuracy of a third-degree | ||
polynomial. ACM Trans. on Math. Softw., 17, 1991. | polynomial. ACM Trans. on Math. Softw., 17, 1991. | ||
+ | (as copied from [[http:// | ||
+ | |||
See also: | See also: | ||
[[http:// | [[http:// | ||