in terp methods
Post on 21-May-2017
247 Views
Preview:
TRANSCRIPT
1
Multidimensional Interpolation Methods
1. Introduction................................................................................................................. 1 2. Notational conventions and definitions ...................................................................... 8 3. One-dimensional methods ........................................................................................ 10
3.1 Linear interpolation............................................................................................. 10 3.2 Cubic interpolation.............................................................................................. 13
4. N-dimensional methods ............................................................................................ 16 4.1 Multilinear interpolation ..................................................................................... 16 4.2 Multicubic interpolation...................................................................................... 18 4.3 Reduced-cubic interpolation .............................................................................. 24
Appendix. Derivations .................................................................................................. 28 A.1 Multilinear interpolation .................................................................................... 28 A.2 Multicubic interpolation..................................................................................... 31 A.3 Reduced-cubic interpolation ............................................................................. 38
1. Introduction Data fitting methods such as spline fitting and interpolation are commonly used to model sparsely sampled data (e.g., for graphical surface rendering) or to speed up function calculation (e.g., for real-time measurement or control applications involving complex modeling simulations). This document describes function approximation algorithms for interpolating data that is sampled on a rectangular grid. The methods are focused on achieving high accuracy, minimal error bias, fast computational throughput, and minimal data storage requirements – especially for problems involving large data structures sampled on a multidimensional grid with many dimensions. The simplest such method is linear interpolation in one dimension. For example, Figure 1 illustrates linear interpolation of the function ]sin[][ xxf π= over the range
, which covers six uniformly-sized data sampling intervals. Figure 2 illustrates the interpolation error, which is zero at the sampling points, but which exhibits a systematic bias within each sampling interval. The error is correlated with the function’s second derivative, and can be reduced by applying a bias-compensating term to the sample data points. Figure 3 illustrates the interpolation using bias-compensated sample data, and Figure 4 illustrates the resulting interpolation error. The error is “unbiased” in the sense that the average error within each interval is approximately zero. (The bias-compensated interpolation algorithm differs from conventional interpolation because each data sample’s ordinate does not represent the function at a particular abscissa
– it is computed as a linear combination of values evaluated at multiple values.)
11 ≤≤− x
][xfx ][xf x
The “accuracy order” of an interpolation algorithm is defined as the highest integer such that the interpolation error is zero for any polynomial of degree n or less. n
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
2
The interpolation error typically scales in approximate proportion to , wherein 1+nδ δ is the sampling interval size. Linear interpolation has accuracy order 1, so the error is approximately proportional to . For example, Figure 5 illustrates the bias-compensated interpolation error for the above example using 24 sampling intervals. Compared to Figure 4,
2δ
δ is reduced by a factor of 4, and the error is reduced by approximately a factor of . 1642 =
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1
-0.5
0
0.5
1
x
f
sampling pointsinterpolated functionexact function
Figure 1. Linear interpolation.
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-0.15
-0.1
-0.05
0
0.05
0.1
0.15
x
f erro
r
sampling pointsinterpolated functionexact function
Figure 2. Linear interpolation error.
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
3
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1
-0.5
0
0.5
1
x
f
sampling pointsbias-compensated fitexact function
Figure 3. Interpolation with bias-compensated sample data.
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
x
f erro
r
sampling pointsbias-compensated fitexact function
δ
Figure 4. Interpolation error with bias-compensated sample data.
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-0.01
-0.005
0
0.005
0.01
x
f erro
r
sampling pointsbias-compensated fitexact function
δ
Figure 5. Bias-compensated interpolation error with 24 sampling intervals.
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
4
Cubic interpolation, which fits both a function and its derivative at the data sample points, has accuracy order 3. Figure 6 illustrates the cubic interpolation error for the above example, again using 24 sampling intervals. The error and its derivative are both zero at the sample points. In this example, the interpolation is computed using exact values for the derivative at the sample points. In practice, a finite-difference derivative estimator may be used, but if a simple, two-point centered-difference estimator is used the accuracy order is reduced to 2. Figure 7 illustrates the error for the preceding example using a two-point difference estimator. (Note the scale difference in Figures 6 and 7. The finite-difference approximation increases the interpolation error by an order of magnitude.) Order-3 interpolation accuracy can be restored by using a 4th-degree Savitzky-Golay derivative estimator, resulting in the interpolation error illustrated in Figure 8.
][xf ′
Whether the interpolation uses exact derivatives (as in Figure 6) or a 4th-degree derivative estimator (Figure 8), the cubic interpolation error exhibits a bias that is approximately correlated to the function’s fourth derivative. As in the case of linear interpolation, this bias can be substantially eliminated by using bias-compensated sample data. For example, the error function illustrated in Figure 8 would be modified as illustrated in Figure 9 with bias compensation.
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1.5
-1
-0.5
0
0.5
1
1.5x 10-5
x
f erro
r
sampling pointsinterpolated functionexact function
Figure 6. Cubic interpolation error with 24 sampling intervals.
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
5
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-3
-2
-1
0
1
2
3x 10-4
x
f erro
r
sampling pointsinterpolated functionexact function
Figure 7. Cubic interpolation error using a two-point, centered-difference estimator for
. ][xf ′
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1.5
-1
-0.5
0
0.5
1
1.5x 10-5
x
f erro
r
sampling pointsinterpolated functionexact function
Figure 8. Cubic interpolation error using a 4th-degree Savitzky-Golay derivative estimator.
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1.5
-1
-0.5
0
0.5
1
1.5x 10-5
x
f erro
r
sampling pointsbias-compensated fitexact function
Figure 9. Bias-compensated cubic interpolation error using a 4th-degree Savitzky-Golay derivative estimator.
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
6
The interpolation methods illustrated above can be generalized to apply to a multidimensional function , wherein is an -dimensional vector,
, and is sampled on a uniform rectangular grid. For example, linear interpolation generalizes to multilinear interpolation by applying linear interpolation to each coordinate ( ). Similarly, applying cubic interpolation to each separate coordinate results in a “multicubic” interpolation that not only matches and its first derivatives at the data sampling points, but also matches all mixed first-order
derivatives (e.g., , , etc.). This requires that quantities (the value and derivatives) be specified at each sampling point, but for large many of these quantities can be omitted without reducing the accuracy order. The number of quantities required per sample point to achieve accuracy order 3 is . Furthermore, accuracy order 2 can be achieved with only
][xf x N),,,( 21 Nxxx K=x f
jx Nj K1=f
jxf ∂∂ /
212 / xxf ∂∂∂ 321
3 / xxxf ∂∂∂∂ N2f N
6/)5(1 2NN ++2/)1(1 NN ++ quantities per
sample point. Multilinear interpolation yields an interpolation function that is globally continuous. A multicubic interpolation function is globally continuous and smooth (i.e., continuously differentiable), but if smoothness is not strictly required an alternative “reduced-cubic” interpolation method may be used.1 This method also has accuracy order 3, but it only requires that quantities (the function and its derivatives ) be specified at each sample point. Moreover, the reduced-cubic interpolation function’s gradient discontinuity is comparatively mild. (The gradient is continuous at the sampling grid points, and the discontinuity between grid cells is only of order . By contrast, the gradient discontinuity for multilinear interpolation is of order
N+1 f jxf ∂∂ /
3δδ .)
The bias compensation methods illustrated above for one dimension can be generalized to multidimensional interpolation. Also, the multidimensional derivatives may be approximated by finite differences or Savitzky-Golay estimates. All of the interpolation methods discussed above require data sampled on a uniform, rectangular grid; however the methods can also be adapted to accommodate nonuniform data sampling. For example, Figures 10-12 illustrate several types of two-dimensional sampling grids. In each of these illustrations the grid points are denoted as
, wherein and are integer indices labeling the points. Figure 10 illustrates a uniform rectangular grid (which has grid lines parallel to the coordinate axes); Figure 11 illustrates a nonuniform rectangular grid (also with axes-aligned grid lines), and Figure 12 illustrates a more general nonuniform, non-rectangular grid.
),( ],[2
],[1
],[ 212121 mmmmmm xx=x 1m 2m
InterpMethods.pdf, version 04/09/2006
1 The reduced-cubic interpolation method has its genesis in optical metrology; see U. S. Patent 6,947,135, “Reduced multicubic database interpolation method for optical measurement of diffractive microstructures,” filed on July 1, 2003, issued on Sept. 20, 2005. Also see ip.com, Document ID IPCOM000022148D, “Accuracy-Optimized Function Approximation Method for Optical Metrology,” Feb. 27, 2004.
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
7
]1,1[x ]1,4[x
]4,1[x ]4,4[x
1x
2x Figure 10. Uniform, rectangular sampling grid.
InterpMethods.pdf, version 04/09/2006
Figure 11. Nonuniform, rectangular sampling grid.
]1,1[x ]1,4[x
]4,1[x ]4,4[x
1x
2x
1x
2x
]1,1[x
]4,1[x
]4,4[x ]1,4[x Figure 12. Nonuniform, non-rectangular sampling grid.
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
8
The function can be defined for real values of and by interpolating between grid points. A function is interpolated by first performing a numerical inversion of to determine the and indices corresponding to , and then interpolating the function at the determined and values.
],[ 21 mmx 1m 2m][xf
],[ 21 mmx 1m 2m x][ ],[],[ 2121 mmmm ff x= 1m 2m
2. Notational conventions and definitions The following notational conventions are used herein: Parentheses – “(…)” – are used for grouping and for delimiting lists and matrices. Square braces – “[…]” – delimit function arguments and superscripts (e.g., , – this avoids ambiguity with products and exponents). Curly braces – “{…}” – denote sets. Vectors are indicated in bold type, as in . The parentheses may be omitted if there is no ambiguity; for example a multivariate function
][xy ],[ 21 mmx
),,,( 21 Nxxx K=x)],,,[(][ 21 Nxxxyy K=x may
alternatively be written as . (A similar convention applies to superscript and subscript arguments, e.g., with
],,,[ 21 Nxxxy K][],,,[ 21 mxx =Nmmm K ),,,( 21 Nmmm K=m .)
represents the unit vector with je
),,,( ,2,1, Njjj eee K
(2.1) ⎩⎨⎧
≠=
=kjkj
e kj ,0,1
,
The following derivative notation will be used,
],,,[],,,[ 2121 Nkj
k
Nk
j xxxyx
xxxy KK∂∂
=∂ (2.2)
(For , .) If 0=k yyk
j =∂ y is a function of just one scalar argument, a similar notation is applied,
][][ xydxdxyd k
kk = (2.3)
Product notation is used to denote mixed derivatives,
(2.4) yy kk
j
kj
j KK
2121
},2,1{
∂∂=⎟⎟⎠
⎞⎜⎜⎝
⎛∂∏
∈
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
9
InterpMethods.pdf, version 04/09/2006
),,,( ][][2
][1
][ mmmmx Nxxx K=
We consider the problem of interpolating a function , based on a sampling of at points , wherein is a real-valued, -dimensional vector argument
( , ), and is an integer-valued, -dimensional index list ( ). The data sampling limits are defined as
][xyy ][mxx = x N
),,,( 21 Nxxx K=x m N),,,( 21 Nmmm K=m
(2.5) },,1,0{ jj Mm K∈ The interpolation algorithms require a uniform, rectangular sampling grid, which has the property that depends only on and is a linear function of . Without loss of generality, the coordinate origin and dimensional units are chosen so that
,
][mjx jm jm
jj mx =][m
(2.6) mx m =][
The interpolation function is denoted as , yFit (2.7) ][][ xx yyFit ≅ yFit is a piecewise-polynomial function. The function has a polynomial form within grid cell , which is defined as the set of points such that ,
][myFitm x 1+≤≤ jjj mxm
(2.8) }),,1{(1for][][ ][ NjmxmyFityFit jjj K∈+≤≤= xx m
The accuracy order of the interpolation is defined as highest integer such that the interpolation error ( ) is zero for any polynomial of degree or less. (The “degree” of a polynomial in is defined as the maximum degree of its monomial terms, wherein a monomial of the form
n][][ xx yyFit − ][xy n
x∏ j
kj
jx )( has a degree of .)
For a general function , the interpolation error typically scales in approximate proportion to , wherein
∑ j jk
][xy1+nδ δ is a factor that represents the dimensional scale of the
coordinate sampling intervals. To state this condition more formally, we suppose that y is defined in terms of a function such that the argument is sampled on a rectangular grid with a sampling interval of
f fδ in all dimensions, i.e.,
][][ xx δfy = (2.9) (The argument, , is sampled at unit intervals, so this relation implies that the argument is sampled at size-
y x fδ intervals.) can typically be expanded in a Taylor
series about the grid point , ][xy
mx =
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
10
∑ ∏∏∈ ∈∈
−⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
},2,1,0{,, },,1{},,1{1!
)(][][
KK KKN
j
j
kk Nj j
kjj
Nj
kj k
mxyy mx (2.10)
(Note: In equation 2.10 and throughout this document the expression is defined as 1.) The derivatives of
00y implicitly include factors of δ ,
][][][},,1{},,1{},,1{
mmm k δδδδ ffyNj
kj
Nj
kj
k
Nj
kj
jjjj
⎟⎟⎠
⎞⎜⎜⎝
⎛∂∑=⎟⎟
⎠
⎞⎜⎜⎝
⎛∂=⎟⎟
⎠
⎞⎜⎜⎝
⎛∂ ∏∏∏
∈∈∈ KKK
(2.11) wherein is shorthand for ∑k (2.12) ∑∑
∈
=},,1{ Njjk
K
k
( is termed the “order” of the differential operator ∑k ∏ ∂
jk
jj .)
Using the above representation and expanding the interpolation error for grid cell
in powers of m δ , the interpolation error is determined to be of order , wherein n is the interpolation accuracy order,
1+nδ
(2.13) 1][ ][][ +=− nOyyFit δxxm
In this type of expression the residual error includes 1+nOδ y derivative factors of order
. The error will converge to zero as )1( +n δ becomes small, provided that the derivatives up to order all exist. )1( +n
3. One-dimensional methods
3.1 Linear interpolation Linear interpolation in one dimension is defined as follows, (3.1.1) ]1[][][][][ ][
1][
0][ ++= myxumyxuxyFit mmm
wherein and are “cardinal functions”, which are defined so that ][][
0 xu m ][][1 xu m
(3.1.2) ]1[]1[],[][ ][][ +=+= mymyFitmymyFit mm
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
11
for any function . This implies that the cardinal functions satisfy the following defining conditions,
y
(3.1.3) })1,0{(]1[,1][ ][][ ∈=+−= ssmusmu m
sm
s
Furthermore, and are linear in . These conditions imply that ][][
0 xu m ][][1 xu m x
(3.1.4) 2 })1,0{()()12()1(][][ ∈−−+−= smxssxu m
s
The interpolation error, , can be approximated by making the substitution
][][][ xyxyFit m −
][][ xfxy δ= (3.1.5) (cf. equation 2.9) and expanding to 2nd order in ][][][ xyxyFit m − δ . This yields 32
21][ ][)1()(][][ δOmydxmmxxyxyFit m +−+−=− (3.1.6)
The factor is equal to , so the error is of order . The factor
in equation 3.1.6 is non-negative across the interpolation interval ( ); thus the error is systematic and is proportional to . The average error across the interval is
][2 myd ][22 mfd δδ 2δ)1()( xmmx −+−
1+≤≤ mxm yd 2
32121
1 ][ ][])[][( δOmyddxxyxyFitm
m
m +=−∫+
(3.1.7)
The error bias can be substantially eliminated by including a bias-compensating term of ][2
121 myd− on the right side of equation 3.1.1. Taking advantage of the
following two relationships, (3.1.8) 1][][ ][
1][
0 =+ xuxu mm
(3.1.9) 322 ]1[][ δOmydmyd ++= (from equations 3.1.4 and 3.1.5), the bias-compensated interpolation function can be represented as
2 An equivalent form of equation 3.1.4 (with 1+≤≤ mxm ) is })1,0{(1][][ ∈−−−= ssmxxu m
s
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
12
32
121][
12
121][
0
2121][
12
121][
0
2121][
1][
0
])1[]1[(][])[][(][
])[]1[(][])[][(][
][]1[][][][
δOmydmyxumydmyxu
mydmyxumydmyxu
mydmyxumyxu
mm
mm
mm
++−++−=
−++−=
−++
(3.1.10) The term on the right of equation 3.1.10 is negligible – it will be absorbed by the
residual in equation 3.1.6. Thus, the bias-corrected interpolation function
3δO3δO tyFi ′
(primed, to distinguish it from the uncorrected function ) can be defined as yFit (3.1.11) ]1[][][][][ ][
1][
0][ ++=′ myCompxumyCompxuxtyFi mmm
wherein is a bias-compensated function defined as yComp ][][][ 2
121 xydxyxyComp −= (3.1.12)
(Assuming that y and are continuous, bias compensation preserves continuity of
and .) yd 2
yComp tyFi ′ With bias compensation, the interpolation error is ( ) 32
121
21][ ][)1()(][][ δOmydxmmxxyxtyFi m +−−+−=−′ (3.1.13)
and the interval-averaged error is
(3.1.14) 41 ][ ])[][( δOdxxyxtyFim
m
m =−′∫+
Note that both the and the terms average out to zero in equation 3.1.14, leaving a residual bias of order .
2δ 3δ4δ
The yd 2 term in equation 3.1.12 can be approximated using a finite-difference derivative estimator, (3.1.15) 42 ]1[][2]1[][ δOxyxyxyxyd +++−−= This substitution in equation 3.1.12 changes (equation 3.1.11) by an increment of order , so it has no effect on equations 3.1.13 and 3.1.14. If the interpolation interval is at one of the limits of the sampling range, constant extrapolation of may be used to avoid out-of range indexing in equation 3.1.15,
][][ xtyFi m′4δ
yd 2
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
13
(3.1.16) 322 ][]1[ δOxydxyd +=± In this case, equation 3.1.13 is unaffected, but the residual bias (equation 3.1.14) is of order , 3δ
(3.1.17) 31 ][ ])[][( δOdxxyxtyFim
m
m =−′∫+
3.2 Cubic interpolation Cubic interpolation in one dimension is defined as follows,
(3.2.1) ]1[][][][
]1[][][][][][
1,1][
0,1
][1,0
][0,0
][
++
+++=
mdyxumdyxu
myxumyxuxyFitmm
mmm
wherein the cardinal functions are defined so that ][][
, xu msk
(3.2.2) })1,0{(][][
][][][
][
∈⎭⎬⎫
+=++=+
ssmdysmdyFit
smysmyFitm
m
for any function . This implies that the cardinal functions satisfy the following defining conditions,
y
(3.2.3) })1,0{(
]1[,1][0]1[,0][
0]1[,0][]1[,1][
][,1
][,1
][,1
][,1
][,0
][,0
][,0
][,0
∈
⎪⎪⎭
⎪⎪⎬
⎫
=+−==+==+==+−=
s
smdusmdumumumdumdu
smusmu
ms
ms
ms
ms
ms
ms
ms
ms
Furthermore, the cardinal functions are cubic polynomials in . These conditions imply that
][][, xu msk x
(3.2.4)3 })1,0{()1()1()(][
)1())(21()21(][][
,1
2][,0 ∈
⎪⎭
⎪⎬⎫
−+−−+−=−+−+−+=
sxmxsmmxxu
xmmxssxums
ms
InterpMethods.pdf, version 04/09/2006
3 An equivalent form of equation 3.2.4 (with 1+≤≤ mxm ) is
( )( )( )( ) })1,0{(
1][121][
2][,1
2][,0 ∈
⎪⎭
⎪⎬⎫
−−−−−=
−−−−−+=s
smxsmxxusmxsmxxu
ms
ms
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
14
Making substitution 3.1.5 ( ][][ xfxy δ= ) and expanding the interpolation error to 4th order in δ , the error has the form, 5422
241][ ][)1()(][][ δOmydxmmxxyxyFit m +−+−−=− (3.2.5)
The average error across the interpolation interval is
547201
1 ][ ][])[][( δOmyddxxyxyFitm
m
m +−=−∫+
(3.2.6)
The error bias can be substantially eliminated by including a bias-compensating term of ][4
7201 myd on the right side of equation 3.2.1. Taking advantage of the following
relationships, (3.2.7) 1][][ ][
1,0][
0,0 =+ xuxu mm
(3.2.8) 544 ]1[][ δOmydmyd ++= (3.2.9) 5555 ]1[,][ δδ OmydOmyd =+= (from equations 3.1.5 and 3.2.4), the bias-compensated interpolation function can be represented as
557201][
1,15
7201][
0,1
47201][
1,04
7201][
0,0
][1,1
][0,1
47201][
1,04
7201][
0,0
47201][
1,1][
0,1
][1,0
][0,0
])1[]1[(][])[][(][
])1[]1[(][])[][(][
]1[][][][
])[]1[(][])[][(][
][]1[][][][
]1[][][][
δOmydmdyxumydmdyxu
mydmyxumydmyxu
mdyxumdyxu
mydmyxumydmyxu
mydmdyxumdyxu
myxumyxu
mm
mm
mm
mm
mm
mm
++++++
++++++=
++
+++++=
+++
+++
(3.2.10) The term on the right of equation 3.2.10 is negligible – it will be absorbed by the
residual in equation 3.2.5. Thus, the bias-corrected interpolation can be defined as
5δO5δO
(3.2.11) ]1[][][][
]1[][][][][][
1,1][
0,1
][1,0
][0,0
][
++
+++=′
mdyCompxumdyCompxu
myCompxumyCompxuxtyFimm
mmm
wherein is a bias-compensated function defined as yComp
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
15
][][][ 47201 xydxyxyComp += (3.2.12)
With bias compensation, the interpolation error is ( ) 54
720122
241][ ][)1()(][][ δOmydxmmxxyxtyFi m ++−+−−=−′ (3.2.13)
and the interval-averaged error is
(3.2.14) 61 ][ ])[][( δOdxxyxtyFim
m
m =−′∫+
Note that both the and the terms average out to zero in equation 3.2.14, leaving a residual bias of order .
4δ 5δ6δ
The derivatives in equations 3.2.1 and 3.2.11 ( dy and dyComp ) can be approximated using a 4th -degree, symmetric Savitzky-Golay derivative estimator, 5
121
32 ])2[]2[(])1[]1[(][ δOxyxyxyxyxdy +−−+−−−+= (3.2.15)
The following asymmetric derivative estimators can also be used to avoid out-of-range indexing in equation 3.2.15, 5
41
65
23
21
121 ]1[][]1[]2[]3[][ δOxyxyxyxyxyxdy +±±±±±= mmmm
(3.2.16) 5
1225
34
41 ][]1[4]2[3]3[]4[][ δOxyxyxyxyxyxdy +±±±±±±= mmm
(3.2.17) If there are only four sampling points, the following derivative estimators may be used, 4
31
21
61 ]1[][]1[]2[][ δOxyxyxyxyxdy +±±±= mmmm (3.2.18)
4
611
23
31 ][]1[3]2[]3[][ δOxyxyxyxyxdy +±±±±±= mm (3.2.19)
The interpolation error and the uncompensated error bias are still of order with these substitutions. With equations 3.2.15-17 the compensated error bias is still of order (equation 3.2.14), but is of order with equation 3.2.18 or 3.2.19.
4δ6δ
5δ The yd 4 term in equation 3.2.12 can also be approximated using a finite-difference derivative estimator, (3.2.20) 64 ]2[]2[])1[]1[(4][6][ δOxyxyxyxyxyxyd +−+++−++−=
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
16
Out-of-range indexing can be avoided in equation 3.2.20 by applying constant extrapolation to , yd 4
(3.2.21) 544544 ][]2[,][]1[ δδ OxydxydOxydxyd +=±+=± With this extrapolation, the residual bias (equation 3.2.14) will be of order . 5δ Each error term of the form in the above equations implicitly includes a factor of (from equation 3.1.5). If the higher-order derivatives of are not sufficiently bounded, it may be advantageous to use derivative estimators of lower degree; or lower-degree estimators may be used simply to improve computational efficiency. The first derivatives in equations 3.2.1 and 3.2.11 can be approximated using a 2nd-degree centered difference estimator,
nδ][xyd n y
3
21 ])1[]1[(][ δOxyxyxdy +−−+= (3.2.22)
At the sampling range limits an asymmetric difference estimator may be used, 3
23
21 ][]1[2]2[][ δOxyxyxyxdy +±±= mmm (3.2.23)
With these derivative estimators the interpolation accuracy order is only 2 (compared to 4 with higher-order estimators, but still better than the order-1 accuracy of linear interpolation), (3.2.24) 3][ ][][ δOxyxyFit m =− In this case the interpolation bias is not significant in comparison to the error, so there no need for bias compensation,
(3.2.25) 41 ][ ])[][( δOdxxyxyFitm
m
m =−∫+
4. N-dimensional methods
4.1 Multilinear interpolation Multilinear interpolation is defined by applying one-dimensional linear interpolation in each separate coordinate dimension. The interpolation has the following form,
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
17
(4.1.1) ∑∈=
+=
}1,0{),,,(
][][
1
][][][
jN
sss
yuyFitKs
ms
m smxx
wherein the cardinal functions are defined so that ][][ xm
su (4.1.2) },,1{};1,0{];[][][ NjsyyFit j K∈∈+=+ smsmm
This implies that the cardinal functions satisfy the following defining conditions,
InterpMethods.pdf, version 04/09/2006
} ,,1{};1,0{,,0,1
][][ Njssu jj K∈∈′⎩⎨⎧
′≠
′==′+
ssss
smms (4.1.3)
][][ xm
su is multilinear in (i.e., linear in each coordinate ), and is a product of factors having the form of equation 3.1.4,
x jx
( )∏
∈
−−+−=},,1{
][ )()12()1(][Nj
jjjj mxssuK
xms (4.1.4)4
(Note: Section A.1 in the Appendix outlines derivations of the equations in this section.) Making substitution 2.9 ( ][][ xx δfy = ) and expanding the interpolation error to 2nd order in δ , the result is a series of terms having the form of equation 3.1.6,
3
},,1{
221
][
][)1()(
][][
δOyxmmx
yyFit
Njjjjjj +∂−+−
=−
∑∈ K
m
xxm
(4.1.5)
The average error over the interpolation grid cell ( 1+≤≤ jjj mxm ) is
3
},,1{
2121
1 1
1][
][
])[][(1
11
δOy
dxdxyyFit
Njj
m
mx
m
mx NN
NN
+∂
=−
∑∫ ∫
∈
+
=
+
=
K
KL
m
xxm
(4.1.6)
Generalizing from equations 3.1.11 and 3.1.12, the error bias can be substantially eliminated by applying bias compensation:
4 An equivalent form of equation 4.1.4 (with 1+≤≤ jjj mxm ) is
( )∏∈
−−−=},,1{
][ 1][Nj
jjj smxuK
xms
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
18
(4.1.7) ∑∈=
+=′
}1,0{),,,(
][][
1
][][][
jN
sss
yComputyFiKs
ms
m smxx
wherein the bias-compensated function is defined as yComp ∑
∈
∂−=},,1{
2121 ][][][
Njj yyyComp
K
xxx (4.1.8)
With bias compensation, the interpolation error is
( ) 3
},,1{
2121
21
][
][)1()(
][][
δOyxmmx
ytyFi
Njjjjjj +∂−−+−
=−′
∑∈ K
m
xxm
(4.1.9)
and the grid-cell-averaged error is (4.1.10) 41 1
1][1
11
])[][( δOdxdxytyFiN
NN
m
mx
m
mx N =−′∫ ∫+
=
+
=KL xxm
Note that both the and the terms in equation 4.1.10 average out to zero, leaving a residual bias of order .
2δ 3δ4δ
The yj
2∂ terms in equation 4.1.8 can be approximated using a finite-difference estimator similar to equation 3.1.15, and – to avoid out-of-range indexing – constant extrapolation of as in equation 3.1.16, yj
2∂ (4.1.11) 42 ][][2][][ δOyyyy jjj +++−−=∂ exxexx (4.1.12) 322 ][][ δOyy jjj +∂=±∂ xex If extrapolation is used (equation 4.1.12), the residual bias is of order , 3δ (4.1.13) 31 1
1][1
11
])[][( δOdxdxytyFiN
NN
m
mx
m
mx N =−′∫ ∫+
=
+
=KL xxm
4.2 Multicubic interpolation Multicubic interpolation is defined by applying one-dimensional cubic interpolation in each separate coordinate dimension. The interpolation has the following form,
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
19
(4.2.1) ∑ ∑ ∏∈=
∈= ∈
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
}1,0{),,,(
}1,0{),,,( },,1{
][][
1 1
][][][
jN
jN
j
kkk
sss Nj
kj, yuyFit
K K Kk s
msk
m smxx
wherein the cardinal functions are defined so that ][][ xm
sk,u
(4.2.2) },,1{};1,0{,
];[][},,1{
][
},,1{
Njsk
yyFit
jj
Nj
kj
Nj
kj
jj
K
KK
∈∈
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=+⎟⎟
⎠
⎞⎜⎜⎝
⎛∂ ∏∏
∈∈
smsmm
This implies that the cardinal functions satisfy the following defining conditions,
(4.2.3) },,1{};1,0{,,,
or,0and,1
][][
},,1{
Njsskk
u
jjjj
,Nj
kj
j
K
K
∈∈′′⎩⎨⎧
′≠′≠
′=′==′+⎟⎟
⎠
⎞⎜⎜⎝
⎛∂∏
∈
′
sskksskk
smmsk
][][
, xmsku is multicubic in (i.e., cubic in each coordinate ), and is a product of factors
having the form of equation 3.2.4, x jx
∏∈ ⎪⎩
⎪⎨⎧
=−+−−+−=−+−+−+
=},,1{
2][
, 1if)1()1()(0if)1())(21()21(
][Nj jjjjjjjj
jjjjjjj
kxmxsmmxkxmmxss
uK
xmsk
(4.2.4)5 (Note: Section A.2 in the Appendix outlines derivations of the equations in this section.) Making substitution 2.9 ( ][][ xx δfy = ) and expanding the interpolation error to 4th order in δ , the result is a series of terms having the form of equation 3.2.5,
5
},,1{
422241
][
][)1()(
][][
δOyxmmx
yyFit
Njjjjjj +∂−+−−
=−
∑∈ K
m
xxm
(4.2.5)
The average error over the interpolation grid cell ( 1+≤≤ jjj mxm ) is
5 An equivalent form of equation 4.2.4 (with 1+≤≤ jjj mxm ) is
( )( )( )( )∏
∈ ⎪⎩
⎪⎨⎧
=−−−−−
=−−−−−+=
},,1{2
2
][,
1if1
0if121][
Nj jjjjjjj
jjjjjjj
ksmxsmx
ksmxsmxu
K
xmsk
InterpMethods.pdf, version 04/09/2006
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
20
5
},,1{
47201
1 1
1][
][
])[][(1
11
δOy
dxdxyyFit
Njj
m
mx
m
mx NN
NN
+∂−
=−
∑∫ ∫
∈
+
=
+
=
K
KL
m
xxm
(4.2.6)
Generalizing from equations 3.2.11 and 3.2.12, the error bias can be substantially eliminated by applying bias compensation:
(4.2.7) ∑ ∑ ∏∈=
∈= ∈
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=′
}1,0{),,,(
}1,0{),,,( },,1{
][][
1 1
][][][
jN
jN
j
kkk
sss Nj
kj, yComputyFi
K K Kk s
msk
m smxx
wherein the bias-compensated function is defined as yComp ∑
∈
∂+=},,1{
47201 ][][][
Njj yyyComp
K
xxx (4.2.8)
With bias compensation, the interpolation error is
( 5
},,1{
4720122
241
][
][)1()(
][][
δOyxmmx
ytyFi
Njjjjjj +∂+−+−−
=−′
∑∈ K
m
xxm
) (4.2.9)
and the grid-cell-averaged error is (4.2.10) 61 1
1][1
11
])[][( δOdxdxytyFiN
NN
m
mx
m
mx N =−′∫ ∫+
=
+
=KL xxm
Note that both the and the terms in equation 4.2.10 average out to zero, leaving a residual bias of order .
4δ 5δ6δ
Many of the terms in equation 4.2.1 are superfluous because they are dominated by the interpolation error. Each derivative operator j∂ , applied to , implicitly includes
a factor of
y
δ (from equation 2.11), so the factor ( )yj
kj
j∏ ∂ is of order (cf.
equation 2.11). Thus, all terms in equation 4.2.1 with
∑kδ
3>∑k can be omitted without reducing accuracy order. Equation 4.2.1 will be generalized as follows to include only terms up to order L in δ ,
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
21
(4.2.11) ∑ ∑ ∏≤
∈=
∈= ∈
∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
Lk
kks
ss Nj
kj,
jN
jN
j yuyFit
k
k s
msk
m smxx},1,0{
),,,(}1,0{
),,,( },,1{
][][
1 1
][][][K K K
(This is the same as equation 4.2.1, except that the sum is truncated to exclude terms with .) With bias compensation, order truncation is applied by modifying equation 4.2.7 in a similar manner,
kL>∑k
(4.2.12) ∑ ∑ ∏≤
∈=
∈= ∈
∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=′
Lk
kks
ss Nj
kj,
jN
jN
j yComputyFi
k
k s
msk
m smxx},1,0{
),,,(}1,0{
),,,( },,1{
][][
1 1
][][][K K K
If equations 4.2.11 and 4.2.12 are identical to equations 4.2.1 and 4.2.7, respectively, and the total number of summation terms is . In general, the number of summation terms is
NL ≥N4
∑∈ −
=},,0{ )!(!
!2counttermLl
N
lNlN
K
(4.2.13)
For example, with the interpolation accuracy is still 3rd order, but the number of terms is reduced from to . With
3=LN4 )6/)5(1(2 2NNN ++ 2=L the accuracy is only 2nd
order (still better than the 1st-order accuracy of multilinear interpolation), but the number of summation terms is reduced to . )2/)1(1(2 NNN ++ The interpolation error is described by equation 4.2.5 if . If the error estimate, without bias compensation, is
3>L 3=L
5
4},1,0{
),,,(}1,0{
),,,( },,1{
][
},,1{
422241
][
1 1
][][
][)1()(
][][:3
δO
yu
yxmmx
yyFitL
jN
jN
j
kkk
sss Nj
kj,
Njjjjjj
+∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂−
∂−+−−
=−
=
∑ ∑ ∏
∑
=∈=
∈= ∈
∈
k
k s
msk
m
smx
m
xx
K K K
K
(4.2.14)
With bias compensation, an extra factor of 720
1 appears in the first sum,
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
22
(
5
4},1,0{
),,,(}1,0{
),,,( },,1{
][
},,1{
4720122
241
][
1 1
][][
][)1()(
][][:3
δO
yu
yxmmx
ytyFiL
jN
jN
j
kkk
sss Nj
kj,
Njjjjjj
+∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂−
∂+−+−−
=−′
=
∑ ∑ ∏
∑
=∈=
∈= ∈
∈
k
k s
msk
m
smx
m
xx
K K K
K
) (4.2.15)
The second summation in these equations, representing the lowest-order truncated terms, is of order , and hence does not affect the accuracy order. The error bias is also still of order without bias compensation (equation 4.2.6) and of order with bias compensation (equation 4.2.10). (The latter result will be demonstrated in the Appendix, Section A.2.)
4δ4δ 6δ
If 2=L the interpolation error is 3rd order in δ ,
(4.2.16)
4
3},1,0{
),,,(}1,0{
),,,( },,1{
][
][
1 1
][][
][][:2
δO
yu
yyFitL
jN
jN
j
kkk
sss Nj
kj,
+∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂−
=−
=
∑ ∑ ∏=
∈=
∈= ∈
k
k s
msk
m
smx
xx
K K K
In this case the error bias is of order , which is not significant in relation to the order-
error, so no bias compensation is required,
4δ3δ
(4.2.17) 41 1
1][1
11
])[][(
:2
δOdxdxyyFit
LN
NN
m
mx
m
mx N =−
=
∫ ∫+
=
+
=KL xxm
The derivatives in equations 4.2.11 and 4.2.12 can be estimated using finite difference estimators. For , with 1=∑k 1=jk and all other components of being zero, one of the following 4th –degree Savitzky-Golay derivative estimators can be used (from equations 3.2.15-17),
k
5
121
32 ])2[]2[(])[][(][
δO
yyyyy jjjjj
+
−−+−−−+=∂ exexexexx (4.2.18)
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
23
5
41
65
23
21
121 ][][][]2[]3[][
δO
yyyyyy jjjjj
+
±±±±±=∂ exxexexexx mmmm
(4.2.19)
5
1225
34
41 ][][4]2[3]3[]4[][
δO
yyyyyy jjjjj
+
±±±±±±=∂ xexexexexx mmm
(4.2.20) (With these approximations the compensated error bias, equation 4.2.10, is still of order
.) If there are only four sampling points for , the following derivative estimators may be used (from equations 3.2.18-19),
6δ jx
4
31
21
61 ][][][]2[][ δOyyyyy jjjj +±±±=∂ exxexexx mmmm (4.2.21)
4
611
23
31 ][][3]2[]3[][ δOyyyyy jjjj +±±±±±=∂ xexexexx mm
(4.2.22) (If equation 4.2.21 or 4.2.22 is used the compensated error bias is of order .) 5δ For , with and 2=∑k 1
1=jk 1
2=jk , the mixed derivative ][
21xyjj ∂∂ in
equations 4.2.11 and 4.2.12 can be estimated by applying two 2nd-degree derivative estimators, each having one of the following forms, 3
21 ])[][(][ δOyyy jjj +−−+=∂ exexx (4.2.23)
3
23
21 ][][2]2[][ δOyyyy jjj +±±±=∂ xexexx mm (4.2.24)
(from equations 3.2.22 and 3.2.23). The combination of two such estimators has a residual error of order . For example, using equation 4.2.23 for both derivatives, the following estimate is obtained,
4δ
4
][][
][][][
2121
2121
21 41 δO
yy
yyy
jjjj
jjjjjj +⎟
⎟⎠
⎞⎜⎜⎝
⎛
−−+−+−
+−−++=∂∂
eexeex
eexeexx (4.2.25)
The 2nd-degree estimators can also be used for 3=∑k , e.g.,
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
24
5
][][
][][
][][
][][
][
321321
321321
321321
321321
321 81 δO
yy
yy
yy
yy
y
jjjjjj
jjjjjj
jjjjjj
jjjjjj
jjj +
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
−−−−−−++
−+−+−++−
+−−++−+−
++−−+++
=∂∂∂
eeexeeex
eeexeeex
eeexeeex
eeexeeex
x
(4.2.26) (None of the above mixed-derivative estimators affects the order of the error bias.) Equations 4.2.11 and 4.2.12 contain no mixed derivatives with 3>∑k . The yj
4∂ term in equation 4.2.8 can also be approximated using a finite-difference derivative estimator, 64 ]2[]2[])[][(4][6][ δOyyyyyy jjjjj +−+++−++−=∂ exexexexxx (4.2.27) (cf. equation 3.2.20). Out-of-range indexing can be avoided in equation 4.2.27 by applying constant extrapolation to , yj
4∂ (4.2.28) 544544 ][]2[,][][ δδ OyyOyy jjjjjj +∂=±∂+∂=±∂ xexxex (The compensated error bias will be of order if equation 4.2.28 is applied.) 5δ If the higher-order derivatives of y are not sufficiently bounded, it may be advantageous to use derivative estimators of lower degree; or lower-degree estimators may be used simply to improve computational efficiency. The first derivatives in equations 4.2.11 and 4.2.12 can be approximated using equation 4.2.23 or 4.2.24 when
. In this case the interpolation accuracy is only order 2, 1=∑k (4.2.29) 3][ ][][ δOyyFit m =− xx so this approximation can be used with 2=L in equation 4.2.11.
4.3 Reduced-cubic interpolation Reduced-cubic interpolation is similar to equation 4.2.1, except that the mixed derivatives of are not used; only the gradient terms are used. The interpolation has the form,
y
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
25
(4.3.1) ∑ ∑∈= ∈
⎟⎟⎠
⎞⎜⎜⎝
⎛+∂++=
}1,0{),,,( },,1{
][,
][][
1
][][][][][
jN
sss Nk
kk yvyuyFitK Ks
ms
ms
m smxsmxx
wherein the cardinal functions and are defined so that ][][ xm
su ][][, xmskv
(4.3.2) },,1{,};1,0{][][
][][][
][
NjksyyFit
yyFitj
kk
K∈∈⎭⎬⎫
+∂=+∂+=+
smsmsmsm
m
m
This implies that the cardinal functions satisfy the following defining conditions,
InterpMethods.pdf, version 04/09/2006
}
,,1{,,};1,0{,
or,0and,1
][
0][0][,0,1
][
][,
][,
][
][
Nikjss
ikik
v
vu
u
jj
ki
k
i K∈∈′
⎪⎪⎪
⎭
⎪⎪⎪
⎬
⎫
⎩⎨⎧
≠′≠=′=
=′+∂
=′+=′+∂⎩⎨⎧
′≠
′==′+
ssss
sm
smsm
ssss
sm
ms
ms
ms
ms
(4.3.3) The following functions satisfy the above conditions,
(4.3.4)6
( )
⎟⎟⎠
⎞⎜⎜⎝
⎛−−−−+
⎟⎟⎠
⎞⎜⎜⎝
⎛−−+−=
∑
∏
∈
∈
},,1{
},,1{
][
)1)(2())((1
)()12()1(][
Nkkkkkk
Njjjjj
mxmxs
mxssu
K
K
xms
(4.3.5)7 ( )
)1()()12(
)()12()1(][},,1{
][,
−−−−
⎟⎟⎠
⎞⎜⎜⎝
⎛−−+−= ∏
∈
kkkkk
Njjjjjk
mxmxs
mxssvK
xms
6 An equivalent form of equation 4.3.4 (with 1+≤≤ jjj mxm ) is
( ) ( )⎟⎟⎠
⎞⎜⎜⎝
⎛−−−−−+⎟⎟
⎠
⎞⎜⎜⎝
⎛−−−= ∑∏
∈∈ },,1{},,1{
][ 2111][Nk
kkkkkkNj
jjj smxsmxsmxuKK
xms
7 An equivalent form of equation 4.3.5 (with 1+≤≤ jjj mxm ) is
( ) ( )( )kkkkkkNj
jjjk smxsmxsmxv −−−−−⎟⎟⎠
⎞⎜⎜⎝
⎛−−−= ∏
∈
11][},,1{
][,
K
xms
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
26
(Note: Section A.3 in the Appendix outlines derivations of the equations in this section.) The reduced-cubic interpolation function is continuous across the grid cell boundaries, but as in the case of multilinear interpolation the gradient is not continuous. However, the gradient is continuous at the sampling grid points, and the discontinuity of the gradient between grid cells is only of order . By contrast, the gradient discontinuity with multilinear interpolation is of order . (The function defined by equation 2.9, as estimated by the interpolation function, has gradient discontinuities of order or
yFit 4δ2δ f
3δ δ using reduced-cubic or multilinear interpolation, respectively.) Making substitution 2.9 ( ][][ xx δfy = ) in equation 4.3.1 and expanding the interpolation error to 4th order in δ , the result is
5
}1,,1{ },,1{22
41
},,1{
422241
][
1 12 12
11112222
][
)1()()1()(
][)1()(
][][
δO
y
xmmxxmmx
yxmmx
yyFit
Nj Njj jj
jjjjjjjj
Njjjjjj
+
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
∂∂
−+−−+−−+
∂−+−−
=−
∑ ∑
∑
−∈ +∈
∈
K K
K
m
m
xxm
(4.3.6) The interpolation error is of order , the same as multicubic interpolation (cf. equations 4.2.5 and 4.2.14), even though the interpolation function (equation 4.3.1) has only
terms (compared to the terms of full multicubic, or the terms for truncated multicubic with
4δ
)1(2 NN + N4)6/)5(1(2 2NNN ++ 3=L , cf. equation 4.2.13).
The average error over the interpolation grid cell ( 1+≤≤ jjj mxm ) is
5
}1,,1{ },,1{
22144
1
},,1{
47201
1 1
1][
1 12
12
1
11
][][
])[][(
δOyy
dxdxyyFit
Nj Njjjj
Njj
m
mx
m
mx NN
NN
+∂∂−+∂−
=−
∑ ∑∑∫ ∫
−∈ +∈∈
+
=
+
=
K KK
KL
mm
xxm
(4.3.7) The error bias can be substantially eliminated by applying bias compensation:
∑ ∑∈= ∈
⎟⎟⎠
⎞⎜⎜⎝
⎛+∂++=′
}1,0{),,,( },,1{
][,
][][
1
][][][][][
jN
sss Nk
kk yCompvyComputyFiK Ks
ms
ms
m smxsmxx
(4.3.8)
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
27
wherein the bias-compensated function is defined as yComp ∑ ∑∑
−∈ +∈∈
∂∂+∂+=}1,,1{ },,1{
22144
1
},,1{
47201
1 12
12][][][][
Nj Njjjj
Njj yyyyComp
K KK
xxxx
(4.3.9) With bias compensation, the interpolation error is
( )
( )
5
}1,,1{ },,1{22
1441
41
},,1{
4720122
241
][
1 12 12
11112222
][
)1()()1()(
][)1()(
][][
δO
y
xmmxxmmx
yxmmx
ytyFi
Nj Njj jj
jjjjjjjj
Njjjjjj
+
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
∂∂
+−+−−+−−+
∂+−+−−
=−′
∑ ∑
∑
−∈ +∈
∈
K K
K
m
m
xxm
(4.3.10) and the grid-cell-averaged error is (4.3.11) 61 1
1][1
11
])[][( δOdxdxytyFiN
NN
m
mx
m
mx N =−′∫ ∫+
=
+
=KL xxm
Note that both the and the terms in equation 4.3.11 average out to zero, leaving a residual bias of order .
4δ 5δ6δ
The derivatives in equations 4.3.1 and 4.3.8 can be estimated using equations 4.2.18-22. The term in equation 4.3.9 can also be approximated using equations
4.2.27 and 4.2.28. The mixed derivative can be estimated by applying two 2nd-degree derivative estimators of the form given by equations 4.1.11 and 4.1.12.
yj4∂
][2212
xyjj ∂∂
If the higher-order derivatives of y are not sufficiently bounded, it may be advantageous to use derivative estimators of lower degree; or lower-degree estimators may be used simply to improve computational efficiency. The derivatives in equations 4.3.1 and 4.3.8 can be approximated using equation 4.2.23 or 4.2.24. In this case the interpolation accuracy is only order 2, as in equation 4.2.29.
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
28
Appendix. Derivations
A.1 Multilinear interpolation The equations in Section 4.1 can be derived by induction on . We define
to be the interpolation function obtained by interpolating on dimensions ; and we define
N][],[ xm nyFit ][xy
n,,1K ] (A.1.1) [][ ],[][ xx mm NyFityFit = The induction conditions are ] (A.1.2) [][]0,[ xxm yyFit =
(A.1.3) ],,,1,,,[][
],,,,,,[][][
111]1,[],[
1
111]1,[],[
0],[
Nnnnnn
Nnnnnnn
xxmxxyFitu
xxmxxyFituyFit
KK
KK
+−−
+−−
+
+=mm
mmm
x
xx
wherein (A.1.4) })1,0{()12)(()1(][],[ ∈−−+−= ssmxsu nn
ns xm
(Equations A.1.3 and A.1.4 are obtained by applying equations 3.1.1 and 3.1.4 to dimension .) The following expression satisfies these conditions, n
(A.1.5) ∑ ∏
∈+
∈
++⎟⎟⎠
⎞⎜⎜⎝
⎛
=
}1,0{,,111
},,1{
],[
],[
21
],,,,,[][
][
n
jsss
Nnnnnj
js
n
xxsmsmyu
yFit
K K
KKx
x
m
m
For , the right side of equation A.1.5 matches equation 4.1.1, with Nn = ∏
∈
=},,1{
],[][ ][][Nj
js j
uuK
xx mms (A.1.6)
(This is equivalent to equation 4.1.4.) The interpolation error and error bias can be estimated by using a truncated Taylor series for (equation 2.10). The series comprises monomial terms of the form
, which are multiplicatively separable in the coordinates. The
interpolation function (equation 4.1.1) corresponding to any such monomial is similarly separable,
][xy
∏ −j
kjj
jmx )( jx
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
29
InterpMethods.pdf, version 04/09/2006
) (A.1.7) (
∏
∏ ∑
∏
∈
∈ ∈
∈
−=
−−+−=
→−=
},,1{
]1,min[
},,1{ }1,0{
},,1{
)(
)()12()1(][
)(][
Nj
kjj
Nj s
kjjjjj
Nj
kjj
j
j
j
j
mx
smxssyFit
mxy
K
K
K
x
x
An interpolator’s “invariant monomials” are the monomials whose associated interpolation error is zero. For multilinear interpolation, it is evident from equation A.1.7 that the invariant monomials are multilinear (i.e., 1≤jk for all j ). The Taylor series for a general function can be partitioned into partial series, each comprising monomials of a particular order:
][xy
4
3};,2,1,0{,,
2};,2,1,0{,,
1};,2,1,0{,,
0};,2,1,0{,,
},2,1,0{,, },,1{},,1{
1111
1!
)(][][
δO
kmx
yy
NNNN
N
j
j
kkkkkkkk
kk Nj j
kjj
Nj
kj
+∑
+
∑
+
∑
+
∑
=
−⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
∑∑∑∑
∑ ∏∏
=∈
=∈
=∈
=∈
∈ ∈∈
kkkk
mx
KKKKKKKK
KK KK
LLLL
(A.1.8) wherein each of the sums after the second “=” covers terms of monomial order ∑ , and the summands (“ ”) are all the same as the first summand. (With substitution of
equaltion 2.9,
kL
][][ xx δfy = , each summand includes an implicit factor of .) The sum over is just ,
∑ kδ0=∑k ][my
] (A.1.9) [
0};,2,1,0{,,1
m
k
yNkk
=
∑
∑=
∈ KK
L
In each term of the sum over , one of the ’s is 1 and the others are all zero. Denoting the subscript of the non-zero as , this sum takes the form
1=∑k jk
jk 1j (A.1.10) ∑∑
∈=
∈
−∂=
∑},,1{
1};,2,1,0{,, 1
111
1
)(])[(Nj
jjjkk
mxyN KKK
L m
k
In the sum over there are two possibilities: Two distinct ’s are 1 and all others are zero, or one of the ’s is 2 and the others are all zero. In the former case, the
2=∑k jk
jk
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
30
subscripts of the first and second non-zero ’s will be denoted respectively as and , and in the latter case the subscript of the non-zero will be denoted as ,
jk 1j
2j jk 1j
∑
∑∑
∈
<∈
=∈
−∂+
−−∂∂=
∑
},,1{
22
};,,1{,2
};,2,1,0{,,
1
11
1
2121
221121
1
!2)(
])[(
)()(])[(
Nj
jjj
jjNjj
jjjjjjkk
mxy
mxmxyN
K
KKK
L
m
m
k (A.1.11)
With there are three possibilities: There are three non-zero ’s, all equal to 1; there are two non-zero ’s, one equal to 1 and the other equal to 2; or there is one non-zero , which is equal to 3,
3=∑k jk
jk
jk
∑
∑
∑∑
∈
≠∈
<<∈
=∈
−∂+
−−∂∂+
−−−∂∂∂=
∑
},,1{
33
};,,1{,
22
};,,1{,,3
};,2,1,0{,,
1
11
1
2121
2211
21
321321
332211321
1
!3)(
])[(
!2)()(
])[(
)()()(])[(
Nj
jjj
jjNjj
jjjjjj
jjjNjjj
jjjjjjjjjkk
mxy
mxmxy
mxmxmxyN
K
K
KKK
L
m
m
m
k
(A.1.12) The interpolation error for a general are estimated by summing the errors associated with each of the monomial terms in equations A.1.9-12. The monomial error calculations can be simplified by considering the special case where (i.e.,
][xy
0m = 0=jm for all j ) and the coordinate ordering is chosen so that jx 11 =j , 22 =j and . Table A.1.1 tabulates the functions corresponding to such monomials up to order 2, and shows the associated interpolation error and error bias for each monomial. Equations 4.1.5 and 4.1.6 are obtained from Table A.1.1 by substituting
33 =j][xy
kk jj mx − for in each monomial ( = 1 or 2), and combining the monomials in linear combinations having the form of equations A.1.9-11.
kxk
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
31
Table A.1.1. Multilinear interpolation error ( )][][][ xx0 yyFit − and error bias
for monomial functions up to order 2
(based on equation 4.1.1).
⎟⎠⎞⎜
⎝⎛ −∫ ∫= =
1
0
1
0 1][
1
])[][(Nx x NdxdxyyFit KL xx0
order ][xy error bias 0 1 0 0 1 1x 0 0
21 xx 0 0 2 2
1x )1( 11 xx − 61
With bias compensation, the monomial functions up to order 3 are tabulated in Table A.1.2 along with each monomial’s bias-compensated form ( , equation 4.1.8) and its interpolation error and bias. Equations 4.1.9 and 4.1.10 are obtained from this tabulation. (Fourth-order monomials such as and would exhibit a non-zero error bias, so the bias would generally be of order .)
][xyComp
22
21 xx 4
1x4δ
Table A.1.2. Multilinear interpolation error ( )][][][ xx0 ytyFi −′ and error bias
for monomial functions up to order 3, with
bias compensation (based on equation 4.1.7).
⎟⎠⎞⎜
⎝⎛ −′∫ ∫= =
1
0
1
0 1][
1
])[][(Nx x NdxdxytyFi KL xx0
order ][xy ][xyComp error bias 0 1 1 0 0 1 1x 1x 0 0
21 xx 21 xx 0 0 2 2
1x 612
1 −x 61
11 )1( −− xx 0
321 xxx 321 xxx 0 0 2
21 xx )( 612
21 −xx ))1(( 61
221 −− xxx 0 3
31x )( 2
1211 −xx )( 2
121
1 xx − 0
A.2 Multicubic interpolation The equations in Section 4.2 can be derived by induction on . We define
to be the interpolation function obtained by interpolating on dimensions ; and we define
N][],[ xm nyFit ][xy
n,,1K ] (A.2.1) [][ ],[][ xx mm NyFityFit = The induction conditions are
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
32
] (A.2.2) [][]0,[ xxm yyFit =
(A.2.3)
],,,1,,,[][
],,,,,,[][
],,,1,,,[][
],,,,,,[][][
111]1,[],[
1,1
111]1,[],[
0,1
111]1,[],[
1,0
111]1,[],[
0,0
],[
Nnnnn
nn
Nnnnn
nn
Nnnnnn
Nnnnnn
n
xxmxxyFitu
xxmxxyFitu
xxmxxyFitu
xxmxxyFituyFit
KK
KK
KK
KK
+−−
+−−
+−−
+−−
+∂
+∂
++
+
=
mm
mm
mm
mm
m
x
x
x
xx
wherein
(A.2.4) })1,0{()1()1()(][)1())(21()21(][
],[,1
2],[,0 ∈
⎪⎭
⎪⎬⎫
−+−−+−=−+−+−+=
sxmxsmmxuxmmxssu
nnnnnnnn
s
nnnnn
s
xx
m
m
(Equations A.2.3 and A.2.4 are obtained by applying equations 3.2.1 and 3.2.4 to dimension .) The following expression satisfies these conditions, n
∑ ∑ ∏∏∈ ∈
+∈∈
++⎟⎟⎠
⎞⎜⎜⎝
⎛∂⎟⎟
⎠
⎞⎜⎜⎝
⎛
=
}1,0{,, }1,0{,,111
},,1{},,1{
],[,
],[
21 21
],,,,,[][
][
n n
j
jjkkk sss
Nnnnnj
kj
nj
jsk
n
xxsmsmyu
yFit
K K KK
KKx
x
m
m
(A.2.5) For , the right side of equation A.2.5 matches equation 4.2.1, with Nn = (A.2.6) ∏
∈
=},,1{
],[,
][ ][][nj
jsk, jj
uuK
xx mmsk
(This is equivalent to equation 4.2.4.) The interpolation function (equation 4.2.1) has the following form for a monomial function , ][xy
( )∏
∏
∈
∈
⎪⎩
⎪⎨⎧
>−+−−−≤−
=
→−=
},,1{2
},,1{
3,3)()2()(3,)(
][
)(][
Nj jjjjjjj
jk
jj
Nj
kjj
kkmxkmxkmx
yFit
mxy
j
j
K
K
x
x
(A.2.7) Thus, the interpolator’s invariant monomials are multicubic (i.e., 3≤jk for all j ).
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
33
The multicubic interpolation error and error bias for a general function can be estimated by expanding its Taylor series to 5th order in
][xyδ ,
6
5};,2,1,0{,,
4};,2,1,0{,,
},2,1,0{,, },,1{},,1{
11
1
)termsinvariant(
!)(
][][
δO
kmx
yy
NN
N
j
j
kkkk
kk Nj j
kjj
Nj
kj
+∑
+
∑
+=
−⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
∑∑
∑ ∏∏
=∈
=∈
∈ ∈∈
kk
mx
KKKK
KK KK
LL (A.2.8)
wherein the “invariant terms” comprise monomials of order 3 or less. These are invariant monomials, which do not contribute to the interpolation error. Furthermore, in the sum over the only non-invariant monomials are those for which one of the ’s is 4 and all others are zero. Denoting the subscript of the non-zero as , this sum takes the form
4=∑k jk
jk 1j
)termsinvariant(
!4)(
])[(},,1{
44
4};,2,1,0{,, 1
11
1
1
+
−∂=
∑
∑∑∈
=∈ Nj
jjj
kk
mxy
N KKK
L m
k (A.2.9)
In the sum over the non-invariant monomials are of the following form: There are either two non-zero ’s, one equal to 1 and the other equal to 4; or there is one non-zero , which is equal to 5. In the former case, the subscripts of the first and second non-zero ’s will be denoted respectively as and , and in the latter case the subscript of the non-zero will be denoted as ,
5=∑k
jk
jk
jk 1j 2j
jk 1j
)termsinvariant(!5
)(])[(
!4)()(
])[(
},,1{
55
};,,1{,
44
5};,2,1,0{,,
1
11
1
2121
2211
21
1
+−
∂+
−−∂∂=
∑
∑
∑∑
∈
≠∈
=∈
Nj
jjj
jjNjj
jjjjjj
kk
mxy
mxmxy
N
K
KKK
L
m
m
k (A.2.10)
The error and error bias for the 4th-order monomials in equation A.2.9 can be determined by considering the representative monomial (i.e., 4
1x 0m = , ), as outlined in Table A.2.1. Equations 4.2.5 and 4.2.6 are obtained from Table A.2.1 by substituting for and combining the monomials in linear combinations having the form of equation A.2.9.
11 =j
11 jj mx − 1x
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
34
Table A.2.1. Multicubic interpolation error ( )][][][ xx0 yyFit − and error bias
for non-invariant monomial functions of
order 4 (based on equation 4.2.1).
⎟⎠⎞⎜
⎝⎛ −∫ ∫= =
1
0
1
0 1][
1
])[][(Nx x NdxdxyyFit KL xx0
order ][xy error bias 4 4
1x 21
21 )1( xx −− 30
1− With bias compensation, the non-invariant monomial functions up to order 5 are tabulated in Table A.2.2 along with each monomial’s bias-compensated form ( , equation 4.2.8) and its interpolation error and bias. Equations 4.2.9 and 4.2.10 are obtained from this tabulation.
][xyComp
Table A.2.2. Multicubic interpolation error ( )][][][ xx0 ytyFi −′ and error bias
for non-invariant monomial functions of
order up to 5, with bias compensation (based on equation 4.2.7).
⎟⎠⎞⎜
⎝⎛ −′∫ ∫= =
1
0
1
0 1][
1
])[][(Nx x NdxdxytyFi KL xx0
order ][xy ][xyComp error bias 4 4
1x 3014
1 +x 3012
12
1 )1( +−− xx 0 4
21 xx )( 3014
21 +xx ))1(( 3012
22
21 +−− xxx 0 5 5
1x )( 614
11 +xx ))1()2(( 612
1111 +−+− xxxx 0
With truncated multicubic interpolation (equation 4.2.11), the invariant monomials are multicubic and are of order L or less. (The truncation has no effect on such monomials.) With , all order-3≤L L monomials are multicubic; hence the invariant monomials are simply the monomials of order L or less. Considering the case , the truncated terms in equation 4.2.11 have the form 3=L
(A.2.11) ∑ ∑ ∏≥
∈=
∈= ∈
∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
4},1,0{
),,,(}1,0{
),,,( },,1{
][
1 1
][][termstruncated
k
k s
msk smx
jN
jN
j
kkk
sss Nj
kj, yu
K K K
(With bias compensation, equation 4.2.12 applies and is replaced by in equation A.2.11.) The incremental error bias induced by the truncation is equal to the grid-cell average of the above expression. Denoting the grid-cell average as
y yComp
K , the
grid-cell average of is (from equation 4.2.4) ][][ xmsk,u
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
35
∑−∑== ∫ ∫+
=
+
=
j jjN
NN
skNm
mx
m
mx N,, dxdxuu )1()()(][][ 61
21
1 1
1][][ 1
11
kmsk
msk xx KL
(A.2.12) The truncated terms’ grid-cell average is
∑ ∑ ∏
∑ ∑ ∏
≥∈=
∈= ∈
≥∈=
∈= ∈
∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂∑−∑=
∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
4},1,0{
),,,(}1,0{
),,,( },,1{61
21
4},1,0{
),,,(}1,0{
),,,( },,1{
][
1 1
1 1
][)1()()(
][][termstruncated
k
k s
k
k
k s
msk
sm
smx
jN
jN
jj jj
jN
jN
j
kkk
sss Nj
kj
skN
kkk
sss Nj
kj,
y
yu
K K K
K K K
(A.2.13) In the above expression, the summation over any for which js 1=jk represents a difference term, which can be approximated by a derivative. For example, if then the sum over can be approximated as follows,
11 =k
1s
],,,)[(
],,,1[],,,[
][)1(1
2221
12
1},,1{
221},,1{
221},,1{
}1,0{ },,1{1
1
11
NNNj
kj
NNNj
kjNN
Nj
kj
s Nj
kj
sk
smsmmOy
smsmmysmsmmy
yk
j
jj
j
++++∂⎟⎟⎠
⎞⎜⎜⎝
⎛∂−=
+++⎟⎟⎠
⎞⎜⎜⎝
⎛∂−++⎟⎟
⎠
⎞⎜⎜⎝
⎛∂=
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂−→=
∏
∏∏
∑ ∏
∈
∈∈
∈ ∈
K
KK
K
KK
K
δ
sm
(A.2.14) (The “ ” term in this expression represents higher-order approximation terms, 2δO
K+∂ y2124
1 ) Applying a similar operation to all sums over with , the following result is obtained,
js 1=jk
∑ ∑ ∏≥
∈=
⎪⎩
⎪⎨⎧
==
∈
= ∈
∑
++⎟⎟⎠
⎞⎜⎜⎝
⎛∂∑−
=
4},1,0{
),,,(
1if}{0if}1,0{
),,,(
2
},,1{
261
21
1
21
1
])[()()(
termstruncated
k
k s
k sm
jN
j
jj
N
j
kkk
kk
s
ss Nj
kj
N OyK K K
δ
(A.2.15)
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
36
The derivative term in the above expression is of order ∑ k2δ ; thus with the
expression is of order and the order-6 error bias (equation 4.2.10) is not affected by order truncation.
4≥∑k8δ
With 2=L a similar argument applies. In this case, 3≥∑k and the contribution of the truncated terms to the error bias is of order 6. Hence, the order-4 error bias (equation 4.2.17) is preserved. The first-order derivative approximations, equations 4.2.18-20, induce an error of order in the interpolation function. The error can be estimated by expanding the equations to 5th order in
5δδ ,
75
301
121
32
][
])2[]2[(])[][(][
δOy
yyyyy
j
jjjjj
+∂+
−−+−−−+=∂
x
exexexexx (A.2.16)
65
201
41
65
23
21
121
][
][][][]2[]3[][
δOy
yyyyyy
j
jjjjj
+∂−
±±±±±=∂
x
exxexexexx mmmm
(A.2.17)
65
51
1225
34
41
][
][][4]2[3]3[]4[][
δOy
yyyyyy
j
jjjjj
+∂+
±±±±±±=∂
x
xexexexexx mmm
(A.2.18) The effect of these approximations on the interpolation error bias can be estimated by using the following expression for the grid-cell-average interpolation function (from equations 4.2.11 and A.2.12),
∑ ∑ ∏
∑ ∑ ∏
∫ ∫
≤∈=
∈= ∈
≤∈=
∈= ∈
+
=
+
=
∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂∑−∑=
∑
+⎟⎟⎠
⎞⎜⎜⎝
⎛∂=
=
Lk
kks
ss Nj
kj
skN
Lk
kks
ss Nj
kj,
m
mx
m
mx N
jN
jN
jj jj
jN
jN
j
N
NN
y
yu
dxdxyFityFit
k
k s
k
k
k s
msk
mm
sm
smx
xx
},1,0{),,,(
}1,0{),,,( },,1{
61
21
},1,0{),,,(
}1,0{),,,( },,1{
][
1 1
1][][
1 1
1 1
1
11
][)1()()(
][][
][][
K K K
K K K
KL
(A.2.19)
(With bias compensation, equation 4.2.12, replaces yComp y in equations A.2.16-19.) For example, the approximation of ][1 xy∂ by equation A.2.16 will only affect the k
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
37
summation term . Thus, the approximation-induced increment in ),0,0,1( K=k][][ xmyFit , denoted as ][][ xmyFit∆ , would have the following form for this case,
6
}1,0{),,,(
5130
161
21][
11121
1132
1
1
1 ][)1()()()(][
])2[]2[(])[][(][
δOyyFit
yyyyy
jN
sss
sN ++∂−−=∆
→−−+−−−+≅∂
∑∈= Ks
m smx
exexexexx
(A.2.20) The summation over represents a difference term, which can be approximated by a 6th-order derivative,
1s
67
2216
1
2215
12215
1
}1,0{
51
1
],,,[
],,,1[],,,[
][)1(1
δδ OOsmsmmy
smsmmysmsmmy
ys
NN
NNNN
s
=+++−∂=
+++∂−++∂
=+∂−∑∈
K
KK
sm
(A.2.21) Thus, the order-6 error bias (equation 4.2.10) is not affected by the ][1 xy∂ approximation (equation 4.2.18), and a similar result follows using either of equations 4.2.19-20. The 4-point derivative estimators, equations 4.2.21-22, have errors of order . Following are 4th-order expansions of these equations,
4δ
54
121
31
21
61
][
][][][]2[][
δOy
yyyyy
j
jjjj
+∂+
±±±=∂
x
exxexexx mmmm (A.2.22)
54
41
611
23
31
][
][][3]2[]3[][
δOy
yyyyy
j
jjjj
+∂−
±±±±±=∂
x
xexexexx mm (A.2.23)
Using equation 4.2.21 or 4.2.22, the approximation-induced error bias is of order . 5δ The 2nd-order, mixed-derivative operator in equation 4.2.25 can be expanded to 4th order as follows,
633
61 ])[][(
][][
][][][
2121
2121
2121
21 41
δOyy
yy
yyy
jjjj
jjjj
jjjjjj
+∂∂+∂∂+
⎟⎟⎠
⎞⎜⎜⎝
⎛
−−+−+−
+−−++=∂∂
xx
eexeex
eexeexx
(A.2.24)
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
38
Considering, for example, the approximation for ][21 xy∂∂ , the associated increment in ][][ xmyFit (equation A.2.19) has the form
( )
6
}1,0{),,,(
3212
31
361
21
][
2121212121
1
21 ])[][()1()()(
][
][][][][][ 41
δOyy
yFit
yyyyy
jN
sss
ssN ++∂∂++∂∂−−
=
→−−+−+−+−−++≅∂∂
∑∈=
+
Ks
m
smsm
x
eexeexeexeexx
(A.2.25) This expression is of order , e.g., 6δ
673321
22
41
332123
1332123
1
332123
1332123
1
}1,0{,2
31
],,,[
],,1,1[],,1,[
],,,1[],,,[
][)1(21
21
δδ OOsmmmy
smmmysmmmy
smmmysmmmy
yss
ss
=++∂∂=
+++∂∂+++∂∂−
++∂∂−+∂∂
=+∂∂−∑∈
+
K
KK
KK
sm
(A.2.26) Thus, application of equation 4.2.25 preserves the order-6 error bias (equation 4.2.10). The mixed-derivative estimator in equation 4.2.25 is obtained by combining two symmetric, first-order derivative estimators (equation 4.2.23), but the same result applies if asymmetric derivatives (equation 4.2.24) are used. Furthermore, a similar analysis can be applied to higher-order mixed-derivative estimators (e.g., equation 4.2.26) that are constructed from symmetric or asymmetric first-order derivative estimators.
A.3 Reduced-cubic interpolation The reduced-cubic interpolation function (equation 4.3.1) is a polynomial that is constructed to match
][][ xmyFity and the gradient of y at the grid points
(equations 4.3.2). These conditions define constraints, and the interpolating polynomial must comprise an equivalent number of basis monomials and corresponding coefficients to satisfy the matching conditions.
smx += )1(2 +NN
The basis monomials for reduced cubic interpolation comprise the multilinear monomials (of which there are , and also the products
of all multilinear monomials with for each
1or0,)(},,1{
=−∏∈
jNj
tjj tmx j
K
)2N
2)( ii mx − },,1{ Ni K∈ (defining additional distinct monomials, for a total of ). In other words, the basis
NN2 )1(2 +NN
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
39
monomials are of the form , wherein ∏∈
−},,1{
)(Nj
tjj
jmxK
3or,2,1,0=jt for all j , and
for at most one 3or2=jt j . The cardinal functions and defined by equations 4.3.4 and 4.3.5 are linear combinations of the reduced-cubic basis monomials. This can be confirmed by expanding the product factor in these equations into a sum of multilinear basis monomials as follows,
][][ xmsu ][][
, xmskv
( )
∑ ∏
∏
∈ ∈
−
∈
−−−
=−−+−
}1,0{,, },,1{
1
},,1{
1
))()12(()1(
)()12()1(
N
jj
tt Nj
tjjj
tj
Njjjjj
mxss
mxss
K K
K (A.3.1)
Equations 4.3.3 can be verified by direct substitution from equations 4.3.4 and 4.3.5. (For example, with , the product term in equation 4.3.4 will be zero if
for any 1or0=′=− jjj smx
jj ss ′≠ j ; hence the first of equations 4.3.3 is established.) It then follows from
equations 4.3.3 and 4.3.1 that the interpolation function satisfies the matching conditions, equations 4.3.2.
][][ xmyFit
The interpolating function is a linear combination of the basis functions, of the general form
∑ ∑∏
∈ ∈∈⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛−+⎟⎟
⎠
⎞⎜⎜⎝
⎛−
=
}1,0{,, },,1{
2),,(,),,(
},,1{
][
1
11)()(
][
N
NN
j
tt Niiittitt
Nj
tjj mxbamx
yFit
K KKK
K
xm
(A.3.2) If is similarly a linear combination of basis monomials of the form ][xy
∑ ∑∏∈ ∈∈
⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛−′+′⎟⎟
⎠
⎞⎜⎜⎝
⎛−=
}1,0{,, },,1{
2),,(,),,(
},,1{1
11)()(][
N
NN
j
tt Niiittitt
Nj
tjj mxbamxy
K KKK
K
x
(A.3.3) then will match identically and the interpolation error will be identically zero, provided that the monomial coefficients and are uniquely determined by conditions 4.3.2 (i.e.,
][][ xmyFit ][xy
),,( 1 Ntta K ),,(, 1 Nttib K
),,(),,( 11 NN tttt aa KK′= and ),,(,),,(, 11 NN ttitti bb KK
′= ). To establish uniqueness of the coefficients, it suffices to show that if is identically zero, then the coefficients are all zero (i.e., we can consider the difference of two
][xy][][ xmyFit
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
40
functions corresponding to the same , and establish that the expansion coefficients for the difference must all be zero). Setting
][xy0][ =xy , and taking advantage of the
following three identities, (A.3.4) ii ss =2)( (A.3.5) k
tk ss k =+1)(
kt
kkk
tmxdxd
k =− )( (A.3.6)
(because and ), the first of equations 4.3.2 (with substitution of equation A.3.2 and ) reduces to
1or0=is 1or0=kt0][ =xy
(A.3.7) 0
0
)(}1,0{,, },,1{
),,(,),,(},,1{1
11=⎟
⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛+⎟⎟
⎠
⎞⎜⎜⎝
⎛∑ ∑∏
∈ ∈∈N
NN
j
tt Niittitt
Nj
tj sbas
K KKK
K
and the second equation reduces to
},,1{;0
)2(
)(}1,0{,,
),,(,
};,,1{),,(,),,(
};,,1{1
1
11 Nk
sbt
tsbas
N
N
NNj
tt
kttkk
k
kiNi
ittitt
kjNj
tj K
K
K
KKK
K
∈=
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
++
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛+
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
∑ ∑∏∈ ≠
∈
≠∈
(A.3.8) The sum over in equation A.3.7 can be expanded to obtain the following equivalent expression,
Nt
)(}1,0{,,
},,1{)1,,,(,)1,,,(
},,1{)0,,,(,)0,,,(
}1,,1{11
1111
1111
=
⎟⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜⎜
⎝
⎛
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎟⎟⎠
⎞⎜⎜⎝
⎛+
+⎟⎟⎠
⎞⎜⎜⎝
⎛+
⎟⎟⎠
⎞⎜⎜⎝
⎛∑
∑
∑∏
∈
∈
∈
−∈−
−−
−−
N
NN
NN
j
tt
NiittittN
Niittitt
Nj
tj
sbas
sba
sK
KKK
KKK
K
(A.3.9) This equivalence holds for ; hence the following two conditions are obtained, 1or0=Ns
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
41
InterpMethods.pdf, version 04/09/2006
0 )(}1,0{,, }1,,1{
)0,,,(,)0,,,(}1,,1{11
1111=⎟
⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛+⎟⎟
⎠
⎞⎜⎜⎝
⎛∑ ∑∏
∈ −∈−∈−
−−
N
NN
j
tt Niittitt
Nj
tj sbas
K KKK
K
(A.3.10)
0)(}1,0{,,
}1,,1{)1,,,(,
)1,,,(,)0,,,(,)1,,,(
}1,,1{11 11
111111
=⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
+
++
⎟⎟⎠
⎞⎜⎜⎝
⎛∑ ∑∏
∈−∈
−∈− −
−−−
N N
NNNj
ttNi
itti
ttNttNtt
Nj
tj sb
bbas
KK
K
KKK
K
(A.3.11) With equation A.3.8 takes the form Nk =
(A.3.12) 0)2(
)(}1,0{,,
),,(,
}1,,1{),,(,),,(
}1,,1{1
1
11 =⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
++
⎟⎟⎠
⎞⎜⎜⎝
⎛+
⎟⎟⎠
⎞⎜⎜⎝
⎛∑ ∑∏
∈−∈
−∈N
N
NNj
ttNttNN
NNi
ittitt
Nj
tj
sbt
tsbas
K
K
KKK
K
Expanding the sum and considering the two cases Nt 1or0=Ns , this implies the following two equations,
0
0
0
1
)(}1,0{,, }1,,1{
)1,,,(,)1,,,(}1,,1{11
1111=⎟
⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛+⎟⎟
⎠
⎞⎜⎜⎝
⎛∑ ∑∏
∈ −∈−∈−
−−
N
NN
j
tt Niittitt
Nj
tj sbas
K KKK
K
(A.3.13)
(A.3.14) )32()(}1,0{,,
)1,,,(,)0,,,(,}1,,1{11
1111=⎟
⎟⎠
⎞⎜⎜⎝
⎛+⎟⎟
⎠
⎞⎜⎜⎝
⎛∑ ∏
∈ −∈−
−−
N
NN
j
ttttNttN
Nj
tj bbs
KKK
K
Subtracting equation A.3.13 from A.3.11 yields
(A.3.15) )()(}1,0{,,
)1,,,(,)0,,,(,}1,,1{11
1111=⎟
⎟⎠
⎞⎜⎜⎝
⎛+⎟⎟
⎠
⎞⎜⎜⎝
⎛∑ ∏
∈ −∈−
−−
N
NN
j
ttttNttN
Nj
tj bbs
KKK
K
and equations A.3.14 and A.3.15 imply
(A.3.16) or0;0)(}1,0{,,
),,,(,}1,,1{11
11==⎟
⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛∑ ∏
∈ −∈−
− Ntt
sttNNj
tj sbs
N
NN
j
KK
K
Expanding the sum in this expression yields 1−Nt
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
42
InterpMethods.pdf, version 04/09/2006
0 )()(}1,0{,,
),1,,,(,1),0,,,(,}2,,1{21
2121=⎟
⎟⎠
⎞⎜⎜⎝
⎛+⎟⎟
⎠
⎞⎜⎜⎝
⎛∑ ∏
∈−
−∈−
−−
N
NNNN
j
ttsttNNsttN
Nj
tj bsbs
KKK
K
(A.3.17) and considering the two cases 1or01 =−Ns yields
(A.3.18) 1
}
or0;0)( 1}1,0{,,
),,,,(,}2,,1{21
121==⎟
⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛−
∈ −∈∑ ∏−
−− Ntt
ssttNNj
tj sbs
N
NNN
j
KK
K
The steps leading from equation A.3.16 to A.3.18 can be repeated inductively to obtain
,,1{;0)(}1,0{,,
),,,,,(,},,1{1
11Nnbs
nN
NnNnN
j
ttssttN
nNj
tj K
KKK
K
∈=⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛∑ ∏
∈ −∈−
+−−
(A.3.19) With this reduces to Nn = (A.3.20) 0),,(, 1
=NssNb K
Equations A.3.10 and A.3.13 have the form
1or0
;0)(}1,0{,, }1,,1{
),,,(,),,,(}1,,1{11
1111
=
=⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛+⎟⎟
⎠
⎞⎜⎜⎝
⎛∑ ∑∏
∈ −∈−∈−
−−
N
tt Niisttistt
Nj
tj
s
sbasN
NNNN
j
K KKK
K
(A.3.21) With the sum in equation A.3.8 can be expanded and equation A.3.20 can be applied to obtain
Nk < Nt
}1,,1{
;0
)2(
)(}1,0{,,
),,,(,
};1,,1{),,,(,),,,(
};1,,1{11
11
1111
−∈
=
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
++
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛+
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
∑ ∑∏∈ ≠
−∈
≠−∈−
−
−−
Nk
sbt
tsbas
N
NN
NNNNj
tt
ksttkk
k
kiNi
isttistt
kjNj
tj
K
K
K
KKK
K
(A.3.22) The steps leading from equations A.3.7 and A.3.8 to equations A.3.20, A.3.21 and A.3.22 can be repeated inductively to obtain the following three relations,
Copyright 2006, Kenneth C. Johnson software.kjinnovation.com
43
(A.3.23) },,1{;0),,(,1 1Nnb
NssnN KK ∈=+−
},,1{
;0)(}1,0{,,
},,1{),,,,,(,
),,,,,(
},,1{1 11
11
Nn
sb
as
nN NnNnN
NnNnNj
ttnNi
isstti
sstt
nNj
tj
K
KK
KK
KK
K
∈
=⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
+⎟⎟⎠
⎞⎜⎜⎝
⎛∑ ∑∏
∈−∈
−∈− +−−
+−−
(A.3.24)
},,1{},,,1{
;0
)2(
)(}1,0{,,
),,,,,(,
};1,,1{),,,,,(,
),,,,,(
};,,1{1
11
11
11
NnnNk
sbt
tsb
a
snN
NnNnN
NnNnN
NnNnN
j
tt
kssttkk
k
kiNi
isstti
sstt
kjnNj
tj
KK
K
KK
KKK
KK
K
∈−∈
=
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
++
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
+
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
∑ ∑∏∈ ≠
−∈
≠−∈−
+−−
+−−
+−−
(A.3.25) Substituting iNn −+= 1 in equation A.3.23, and Nn = in A.3.24, yields (A.3.26) 0),,(, 1
=Nssib K
(A.3.27) 0),,( 1
=Nssa K
Thus, if is identically zero the monomial coefficients in equation A.3.2 are all zero. It follows that for a general function the coefficients are uniquely determined by equations 4.3.2, and hence if is a linear combination of the basis monomials (equation A.3.3) the interpolation error is identically zero. This establishes that the basis monomials are the invariant monomials for reduced-cubic interpolation.
][xy][xy
][xy
The multicubic interpolation error and error bias for a general function can be estimated by using its 5th-order Taylor series, equation A.2.8. The 3rd- and lower-order terms in the series (indicated as “invariant terms”) comprise invariant monomials, which do not contribute to the interpolation error. In the sum over
][xy
4=∑k the only non-invariant monomials are those for which one of the ’s is 4 and all others are zero, or two of the ’s are 2 and all others are zero. Thus, this sum takes the form
jk
jk
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
44
)termsinvariant(!4
)(])[(
!2!2)()(
])[(
},,1{
44
};,,1{,
2222
4};,2,1,0{,,
1
11
1
2121
2211
21
1
+−
∂+
⋅−−
∂∂=
∑
∑
∑∑
∈
<∈
=∈
Nj
jjj
jjNjj
jjjjjj
kk
mxy
mxmxy
N
K
KKK
L
m
m
k
(A.3.28) Considering only non-invariant monomials, the sum over 5=∑k takes the form,
)termsinvariant(!5
)(])[(
!4)()(
])[(
!3!2)()(
])[(
!2!2)()()(
])[(
},,1{
55
};,,1{,
44
};,,1{,
3232
,,};,,1{,,
2222
5};,2,1,0{,,
1
11
1
2121
2211
21
2121
2211
21
323121321
332211
321
1
+−
∂+
−−∂∂+
⋅−−
∂∂+
⋅−−−
∂∂∂
=
∑
∑
∑
∑
∑
∑
∈
≠∈
≠∈
<≠≠∈
=∈
Nj
jjj
jjNjj
jjjjjj
jjNjj
jjjjjj
jjjjjjNjjj
jjjjjjjjj
kk
mxy
mxmxy
mxmxy
mxmxmxy
N
K
K
K
K
KK
L
m
m
m
m
k
(A.3.29) Table A.3.1 tabulates the representative monomials and , and the associated errors and error bias corresponding to the 4th-order monomials in equation A.3.28. Equations 4.3.6 and 4.3.7 are obtained from this tabulation.
22
21 xx 4
1x
Table A.3.1. Reduced-cubic interpolation error ( )][][][ xx0 yyFit − and error bias
for non-invariant monomial functions of
order 4 (based on equation 4.3.1).
⎟⎠⎞⎜
⎝⎛ −∫ ∫= =
1
0
1
0 1][
1
])[][(Nx x NdxdxyyFit KL xx0
order ][xy error bias 2
22
1 xx )1()1( 2211 xxxx −−− 361− 4
41x 2
12
1 )1( xx −− 301−
With bias compensation, the non-invariant monomial functions up to order 5 are tabulated in Table A.3.2 along with each monomial’s bias-compensated form ( , equation 4.3.9) and its interpolation error and bias. Equations 4.3.10 and 4.3.11 are obtained from this tabulation.
][xyComp
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
45
Table A.3.2. Reduced-cubic interpolation error ( )][][][ xx0 ytyFi −′ and error bias
for non-invariant monomial functions of
order up to 5, with bias compensation (based on equation 4.3.8).
⎟⎠⎞⎜
⎝⎛ −′∫ ∫= =
1
0
1
0 1][
1
])[][(Nx x NdxdxytyFi KL xx0
order ][xy ][xyComp error bias 2
22
1 xx 3612
22
1 +xx 361
2211 )1()1( +−−− xxxx 0 4 4
1x 3014
1 +x 3012
12
1 )1( +−− xx 0 2
32
21 xxx )( 3612
32
21 +xxx ))1()1(( 361
33221 +−−− xxxxx 0 3
22
1 xx )( 1212
22
12 +xxx ))1()1(( 1212
2112 +−−− xxxx 0 4
21 xx )( 3014
21 +xx ))1(( 3012
22
21 +−− xxx 0
5
51x )( 6
1411 +xx ))1()2(( 6
121111 +−+− xxxx 0
The grid-cell-average cardinal functions have the following form (from equations 4.3.4 and 4.3.5), Nm
mx
m
mx N,N
NN
dxdxuu )(][][ 21
1 1
1][][ 1
11
== ∫ ∫+
=
+
=KL xx m
smsk (A.3.30)
k
N
NN
sNm
mx
m
mx Nkk dxdxvv )1()()(][][ 61
21
1 1
1][
,][
,1
11
−== ∫ ∫+
=
+
=KL xx m
sm
s (A.3.31)
The effect of the derivative approximations on the interpolation error bias can be estimated by using the following expression for the grid-cell-average interpolation function (from equations 4.3.1, A.3.30 and A.3.31),
∑ ∑
∫ ∫
∈= ∈
+
=
+
=
⎟⎟⎠
⎞⎜⎜⎝
⎛+∂−++=
=
}1,0{),,,( },,1{
61
21
1 1
1][][
1
1
11
][)1()(][)(
][][
jN
k
N
NN
sss Nk
ksN
m
mx
m
mx N
yy
dxdxyFityFit
K K
KL
s
mm
smsm
xx
(A.3.32)
(With bias compensation, equation 4.3.8, replaces yComp y in these equations.) If equation 4.2.18 is used to approximate ][1 xy∂ , then the error in the derivative is given approximately by the 5th-order term in equation A.2.16, and the resulting approximation-induced increment in ][][ xmyFit , denoted as ][][ xmyFit∆ , would have the following form,
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
46
6
}1,0{),,,(
5130
161
21][
11121
1132
1
1
1 ][)1()()()(][
])2[]2[(])[][(][
δOyyFit
yyyyy
jN
sss
sN ++∂−−=∆
→−−+−−−+≅∂
∑∈= Ks
m smx
exexexexx
(A.3.33) The summation over represents a difference term, which can be approximated by a 6th-order derivative,
1s
67
2216
1
2215
12215
1
}1,0{
51
1
],,,[
],,,1[],,,[
][)1(1
δδ OOsmsmmy
smsmmysmsmmy
ys
NN
NNNN
s
=+++−∂=
+++∂−++∂
=+∂−∑∈
K
KK
sm
(A.3.34) Thus, the order-6 error bias (equation 4.3.11) is not affected by the ][1 xy∂ approximation (equation 4.2.18), and a similar result follows using either of equations 4.2.19-20. (However, with the 4-point derivative estimators, equations 4.2.21-22, the error bias would be of order .) 5δ The reduced-cubic interpolation function is continuous across grid cell boundaries. For example, the continuity condition at the boundary is NN mx = (A.3.35) 0],,,[],,,[ 11
]1,,[11
],,[ 11 =− −−
− NNmm
NNmm mxxyFitmxxyFit NN KK KK
The function’s gradient, however, is not continuous between cells, although based on the gradient-matching condition (the second of equations 4.3.2) it is continuous at the sampling grid points. The order of the gradient discontinuity between grid cells can be estimated by differentiating the interpolation error, equation 4.3.6. The interpolation fitting error is of order ; and the gradient error and gradient discontinuity are both also of order . (By contrast, a similar calculation with equation 4.1.5 indicates that the multilinear interpolation’s gradient error and discontinuity are of order .)
4δ4δ
2δ
InterpMethods.pdf, version 04/09/2006 Copyright 2006, Kenneth C. Johnson
software.kjinnovation.com
top related