Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
kvalobs:kvoss:system:qc2:requirements:algorithms:akima_splines [2010-04-15 15:41:17]
gabrielk sub, sup ferdig
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<sub>0</sub> + a<sub>1</sub> (x − x<sub>i</sub>) + a<sub>2</sub> (x − x<sub>i</sub>)<sup>2</sup> + a<sub>3</sub> (x − x<sub>i</sub>)<sup>3</sup> ,+y = a<sub>0</sub> + a<sub>1</sub> (x − x<sub>i</sub>) + a<sub>2</sub> (x − x<sub>i</sub>)<sup>2</sup> + a<sub>3</sub> (x − x<sub>i</sub>)<sup>3</sup>(1)
  
 with coefficients defined by with coefficients defined by
Line 19: Line 19:
 and, and,
  
-m<sub>i</sub> = ( y<sub>i+1</sub> − y<sub>i</sub> ) / ( x<sub>i+1</sub> − x<sub>i</sub> ),+m<sub>i</sub> = ( y<sub>i+1</sub> − y<sub>i</sub> ) / ( x<sub>i+1</sub> − x<sub>i</sub> ),  (2)
  
 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, y<sup>'</sup>, is what makes the Akima methods unique. The derivative is The method of determining the derivatives, y<sup>'</sup>, is what makes the Akima methods unique. The derivative is
  
-y<sup>'</sup><sub>i</sub> = ( Σ w<sub>k</sub>f<sup>'</sup><sub>k</sub> ) / ( Σ w<sub>k</sub> )+y<sup>'</sup><sub>i</sub> = ( Σ w<sub>k</sub>f<sup>'</sup><sub>k</sub> ) / ( Σ w<sub>k</sub> )  (3)
  
 where f<sup>'</sup><sub>k</sub> is the computed derivative at P<sub>i</sub> of a third-order polynomial passing through P<sub>i</sub> and where f<sup>'</sup><sub>k</sub> is the computed derivative at P<sub>i</sub> of a third-order polynomial passing through P<sub>i</sub> and
 three other nearby points: three other nearby points:
  
-f<sup>'</sup><sub>1</sub> = F (P<sub>i−3</sub>, P<sub>i−2</sub>, P<sub>i−1</sub>, P<sub>i</sub>+f<sup>'</sup><sub>1</sub> = F (P<sub>i−3</sub>, P<sub>i−2</sub>, P<sub>i−1</sub>, P<sub>i</sub>)  (4)
  
-f<sup>'</sup><sub>2</sub> = F (P<sub>i−2</sub>, P<sub>i−1</sub>, P<sub>i</sub>, P<sub>i+1</sub>+f<sup>'</sup><sub>2</sub> = F (P<sub>i−2</sub>, P<sub>i−1</sub>, P<sub>i</sub>, P<sub>i+1</sub>)  (5)
  
-f<sup>'</sup><sub>3</sub> = F (P<sub>i−1</sub>, P<sub>i</sub>, P<sub>i+1</sub>, P<sub>i+2</sub>+f<sup>'</sup><sub>3</sub> = F (P<sub>i−1</sub>, P<sub>i</sub>, P<sub>i+1</sub>, P<sub>i+2</sub>)  (6)
  
-f<sup>'</sup><sub>4</sub> = F (P<sub>i</sub>, P<sub>i+1</sub>, P<sub>i+2</sub>, P<sub>i+3</sub>). +f<sup>'</sup><sub>4</sub> = F (P<sub>i</sub>, P<sub>i+1</sub>, P<sub>i+2</sub>, P<sub>i+3</sub>).  (7)
  
-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,+
  
-w<sub>k</sub> = 1 / v<sub>k</sub>d<sub>k</sub>.+w<sub>k</sub> = 1 / v<sub>k</sub>d<sub>k</sub> (8)
  
 The distance factor is the sum of squares of the distance from P<sub>i</sub> and the other three points: The distance factor is the sum of squares of the distance from P<sub>i</sub> and the other three points:
Line 53: Line 52:
  
 The volatility factor, v<sub>k</sub>, is the sum of squares of deviation from a least-squares linear fit of the The volatility factor, v<sub>k</sub>, is the sum of squares of deviation from a least-squares linear fit of the
-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
  • kvalobs/kvoss/system/qc2/requirements/algorithms/akima_splines.1271346077.txt.gz
  • Last modified: 2022-05-31 09:23:18
  • (external edit)