The Quasi-characteristic Method
3.2 Interpolation Schemes
3.2.2 Piecewise Polynomials
For the data set j= 0 ,\,...,n , assumed ordered such that *jA < x}, the interpolating piecewise polynomial, S m(*,y) of order m + 1, is the concatenation of all piecewise polynomials defined by
pj jx ) = CjO + CßX + v 2 + ••• +• V ” (3’10) of degree m on each of the subintervals [xj9xj+l]. Where the two piecewise polynomials meet are known as knots or nodes.
Irrespective of the type of basis functions and the interval chosen the conditions described above must be used to determine the unknown constant coefficients in equation (3.10). The mixed condition, where the constants are chosen to satisfy interpolator^ and the smoothness constraints,
P /\X j) = f m(Xj) for k > 0 can be employed. A number of these conditions and basis functions are used in several piecewise interpolating polynomials are described below.
(a) Lagrange Interpolant
Given m + 1 real numbers there exists a piecewise polynomial Pjm(x) of degree m which interpolates/!*) at the points xp xj+l,...pcj+m that satisfies the pure interpolator^ conditions
Pjm(Xj) =fiXj) j = 1,...,1 +m
which is called the Lagrange form of the interpolating polynomial. It is the simplest and most practical of the interpolating polynomials.
Consider a Lagrangian interpolant in the interval [xjrxj+l\. In this interval there are only two knowns, fixj) and/(*;+1). A linear piecewise Lagrangian interpolant, m = 1, which has two unknown coefficients, can be fitted in this interval.
The derivative P'm(x) is constant on each interval with a jump at each of the knots, therefore Lagrangian interpolation is only C°[a,b]. A higher-order polynomial is required to obtain a smoother interpolant over the interval [a,b]. The simplest of these are piecewise Hermite interpolants.
(b) Hermite Interpolant
To overcome the discontinuity in the derivatives at the knots of a piecewise Lagrange interpolant, Hermite interpolation could be used. The Hermite interpolant fits a polynomial to a function/!*) which not only interpolates^*) at each knot, but also interpolates a given number of consecutive derivatives of/(*) at each knot.
There exists a unique polynomial Pjm(x) of order m which at each knot xp j = 0 ,1 ,..,/z solves the pure interpolation condition
Pjm(Xj) = f {k)(Xj) for 0 < k < m -2. (3-11) It is clear from these constraints that the Hermite polynomial H(x) E C (ml)l2[a,b] since derivatives of P ^(xt) and P0.i)m(k)(Xj), match f ik)(Xj), for k = 0 2 . When m = 1 we have simply the piecewise linear Lagrange polynomials that belong to C°[a,b].
The simplest Hermite polynomial demands that the function values and the first derivative of fix)
are satisfied in each subinterval, k = 1 in equation (3.11). Four equations could be written for each subinterval, \xjyxj+l\. The cubic Hermite polynomial is the only polynomial of degree m = 3 that satisfies these conditions. These equations can be solved without any additional information for each subinterval. However, the solution of the system of equations for every subinterval may be computationally expensive. Alternatively, by selecting a more convenient set of basis functions, (see, for example Prenter [1975]), the cubic Hermite polynomial can also be expressed in terms of the value and the derivative at two adjacent knots using (Hyman [1983])
H{x) = cx + (x - Xj)c2 + (x - Xj)2c3 + (x - Xj)3c4 (3.12) where Xj < x < xj+l, cx = yp c2 = yj, Af = (yj+l - y^/hj
3Aj - 2yj -ypi ^ _ - 2 A + yj + ypl
c3 - , c4 — ,
yj = f(Xj) and hj = xj+l - xp which is more amenable for solution using digital computers than solving a system of equations.
Within the interval [x0>*J the cubic polynomial is infinitely differentiable. However, only the first derivative is guaranteed to exist at the knots, therefore, H{x) E C l[xQ,xn\. Because higher derivatives of fix) have not been matched at the knots, then Pj'jjCj) is unlikely to exist. To obtain greater smoothness, splines or higher-order Hermite polynomials are required.
If continuity of the second derivative is also satisfied at the knots, k = 2 in equation (3.11) the resulting interpolant is a quintic Hermite polynomial (m = 5) and H(x) E C 2[x0yxn].
In many practical applications, the derivatives at the knots are not known and hence must be determined from the data. The continuity of the derivatives and the order of accuracy depend on how the derivatives are calculated, which can also significantly influence the final shape of the interpolant.
Estimation of the Nodal Derivatives
It is important to produce a shape-preserving interpolant. A shape preserving interpolation is obtained if properties of the data, such as monotonicity or convexity, are preserved and the interpolant is free of extraneous inflection points often seen in polynomial interpolation.
The Quasi-Characteristic Method 3.8
The interpolant H(x) is considered locally monotone increasing if A; = (yj+l -y)lh i > 0, yj > 0 and y/+1 > 0, with a similar definition for monotone decreasing. If A = 0, then H(x) is monotone only if yj = y/+1 = 0. Similarly the data are considered convex if yj < A1 < y/+1, with a similar definition for concave. The generic terms monotone denote either monotone increasing or decreasing, and convex denotes either convex or concave.
Certain constraints must be imposed on the derivative estimates used in shape preserving interpolants. The constraints can be written in terms of restrictions on the derivatives estimates
y, at the endpoint of an interval, as a function of the discrete slope A within the interval. The constraint on yj based on A?.1 of the interval to the left may be different from that based on Aj
of the interval to the right. If a different derivative estimate is used at a knot for adjacent intervals the interpolant is C°[a,b]. If the same derivative estimate is used at a knot for adjacent intervals the interpolant is C l[a,b].
For monotone data Fritsch and Carlson (1980) have shown that cubic Hermite interpolant to
(Xj,yj,yj) and (xj+l,yj+l,yj+1) is monotone if and only if (ctj9ßj) lies in a finite region bounded by the curve x2 + y 2 + x y - 6 x - 6 y + 9 = 0, where otj = yj/Aj and ßj = yj+l /A;.
When supplying derivative boundary conditions, the order of accuracy of the boundary derivative estimation required reduces by the order of the derivative. For example, the 0 (ti) derivative approximations will give O ft) bounds on the interpolation error. Therefore, it is prudent to calculate the derivatives with the accuracy at least commensurate with the accuracy of the interpolation scheme.
A three-point approximation of the derivatives is given by yj = (Aja + A;)/2 for equally spaced data, has an error 0(h3).
Akima (1970) uses the following weighted average of Aj and Al> i
d. b.
---- — A. . + -----— A.
dj + b: 1 d: + b: J for j = 3 ,...,n-2
where, dj = | A;+1 - A; |, and b} = | AjA - A;,21, is 0(h2).
The Hyman (1983) fourth-order finite difference method for estimating the derivative is
yj
-y^i
+ ^ . i - 8v m +yhi
-Xj.2 + 8X;.1 - 8*,., + Xh2
reduced to
1 + 4/*i
12 for equally spaced data.
Standard algorithms for approximating the derivative, y\ such as the three-point formula (or arithmetic mean), the approximation used by Akima (1970) and Hyman (1983) do not guarantee monontonicity.
Hyman (1982) developed the following 0(h4) monotone constrained parabolic method for estimating the derivatives y ', (see Renka [1987]).
Aj + hx{Aj - A2)/(^1 + h2) (hjAj + hjAj_l)/(hj_l + hj) + K -l ( A n - l " K J H K - 2 + K - d if J = 1 if 2 < j < n - \ if j = n. (3.13)
These values are constrained by
min(max{0,y'}, 3 min{ \ | , | A; | })
max(min{0,y'}, -3 min{ \ A._p | A. | })
if SGN > 0 if SGN < 0
(3.14)
where, SGN = sign \ AjA \ if | AjA \ > |A; |, otherwise SGN = sign(Aj). These constraints are necessary to satisfy monotonicity by avoiding the situation that yj ^ 0, as either A o r Aj -» 0. A harmonic mean approximation to the derivative given by Fritsch and Butland (1984) as
2AmA/(A._1 0
+ if A._,A. > 0 if A. .A. < 0 j
-1 j
automatically satisfies the necessary conditions for preserving monotonicity and convexity of the data (Rasch and Williamson [1990]). This is also true for the simple geometric mean
approximation to the derivative of 0{h2) for equally spaced data
sign(A)
0
if A._,A. > 0 if A,.,A, < 0 and for the following expression proposed by Fritsch and Butland (1984)
3IVMA-1
max{Ah V A) + 2min(Aj_v Aj)
0
if A. .A. > 0
j~i j
if A._XA. < 0 which is 0(h).
Hyman (1983) concluded that the higher-order fourth-order finite difference method is to be preferred to low-order methods, such as Akima (1970) and Fritsch and Butland (1984).
The Quasi-Characteristic Method 3.10
Frisch and Butland (1984) found that the harmonic mean is too restrictive, producing interpolants that are "too flat".
Renka (1987) found that the shape-preserving methods of Akima (1970), Fritsch and Butland (1984) and Hyman (1982) to be comparable to each other.
Comparing several methods for approximating the derivatives, y j, Rasch and Williamson (1990) concluded that the geometric mean and harmonic mean derivative estimates are consistently less accurate than the Akima (1970) and Hyman (1983) methods. Although their virtue is their simplicity, they are generally of insufficient accuracy for many applications. The Hyman (1983) derivative estimate is the most accurate, which is not surprising since it is 0{hA).
Local Versus Global Interpolation
Piecewise interpolants can be either local or global. For local interpolating polynomials changing the value and derivatives at the knots only changes the interpolant in the region \xjAyxj+l]. If the calculation of the derivatives is also local, only nearby data points are needed when interpolating between Xj and xj+l. Local methods are desirable in interactive graphics because adding, changing, or removing data in the domain will only change the interpolant in the vicinity of the modified data. When storage requirements are critical, as is the case for very large data sets or multi-dimensional interpolation, local methods have obvious advantages. The greatest disadvantage with local interpolants is that there is generally a discontinuity in the higher derivatives at the knots. A smoother interpolant is obtained if continuity of the higher derivatives are satisfied over the whole computational domain. This results in a global interpolant. The price paid for a global interpolant is that it is computationally more expensive to obtain.
Interpolants that satisfy pure interpolator conditions are not necessarily global. They are generally considered as local interpolants. Global interpolants must satisfy mixed or variational conditions. Splines are global interpolants.
Although it is possible to construct a cubic polynomial within a subinterval using the value and first derivative at the knot, there is no guarantee that higher derivatives are continuous at the knots. To obtain a smooth polynomial over the entire region, continuity of higher derivatives are necessary at the knots. Spline interpolants have continuous higher derivatives over the entire computational domain. If continuity of the higher derivatives, > (m - l)/2, are not required, Hermite interpolants are considered more economical and efficient than splines.
Splines satisfy a set of mixed conditions. They are required to satisfy the interpolator^ conditions
3.2.3 Splines
PjJXj) = fix ) f o r ; = 0,1,..., n (3.15)
and the smoothness or continuity of the derivatives
(3.16) up to order m - 1 between the subintervals at the knots.
A spline S m(x,y) is C ml[a,b] if S m(x,y) is continuous and has continuous derivatives for all orders less than or equal to m - 1.
There are a total of n(m + 1) coefficients defining S m(x,y) on [a,b]. The continuity conditions, equation (3.16) provide (m - 1 )(n - 1) equations and the interpolator conditions, equation (3.15) provide another 2n equations. The remaining m -1 equations required to define S m(x,y) uniquely are provided by the boundary conditions at x0 and xn.
Alternatively, splines may be derived by satisfying variational conditions. A function, from a given set of functions, is sought that minimizes the variational
and satisfies the interpolator conditions Pjm(Xj) = f[Xj) for all j.
With k = 2, equation (3.17) minimizes the second derivative, which approximates the curvature
(see, for example Hildebrand [1987]), or L2 norm of the interpolating polynomial. If the boundar conditions
are used, then the variational problem produces an aesthetically pleasing natural spline, which has up to the first k = m - 1 continuous derivatives and passes through the data. However, a spline may not satisfy the interpolator conditions, Pjm(k)(x,) = f {k)(Xj) for k > 1 at all the knots.
(a) Cubic Splines
For C{x) = C 2[a,b] equation (3.17) becomes
The function which minimizes this expression leads to the solution 0 4\x) = 0 on [xjyxj+l\. This corresponds to a cubic polynomial, m = 3, with a linear variation of the second derivative in the interval [xjyxj+l\. This spline, which has continuous first and second derivatives and satisfies the boundar conditions C"(x0) = C"(xn) = 0 is known as a natural Cubic spline. It is the simplest and most popular spline. The Cubic spline interpolant is global because the spline depends e v e r where on the function value at each knot.
Alternative derivative boundar conditions can be used. The first is to assume that values of derivatives
at the boundar are known. The disadvantage of this approach is that for empirical data these (3.17)
Xj
The Quasi-Characteristic Method 3.12
derivatives are rarely available. However, the appropriate derivatives can be estimated using finite differences.
If the boundary conditions are unknown, then the best choice is the not-a-knot condition. This scheme, which does not require any additional information, appears to be a better choice than the natural spline since the second derivative does not generally vanish at the end points of the interval. In this case, the second and second last nodes are removed as knots by making the cubic pieces join up with three continuous derivatives.
The use of such low degree polynomials such as cubic polynomials, reduce the risk of oscillations, while second derivative continuity is sufficient in many applications. Cubic splines can and do produce extraneous inflection points in the interpolant in the vicinity of rapid changes in the data. There are a number of approaches that could be adopted to reduce the occurrence of these extraneous inflection points.
(b) Taut Splines
Taut splines developed by de Boor (1978) produces a Cubic spline that preserves the convexity of the data by inserting at most an additional knot in each subinterval. It does however, not guarantee monotonicity of the data (Fritsch and Carlson [1980]). Unfortunately, there is no simple rule for selecting the location of these additional knots or the parameter that the user must select to control the smoothness of the interpolant. The proper choice of this smoothing parameter appears to be data dependant.
(c) Exponential Splines
An alternative to Cubic splines which has the ability to avoid the production of extraneous inflection points in the interpolant is the Exponential spline, E(x).
Exponential splines pass through the function values and also have continuous first and second derivatives. In terms of the variational, equation (3.17), this can be expressed as
n
1 = E
I [E"(x)f + \j[E'(x)]2d (3.18) where the tension parameter Xy indicates the relative importance of the first derivative in the interpolating function. The function which minimizes this expression must satisfy the equation&4)(x) - \ 2E"(x) = 0 on \xjyxJ+l]. With the natural boundary conditions E"(x0) = E"(xn) = 0 this corresponds to an interpolation function with a linear variation of quantity E"(Xj) - X2E(x) in the interval [xjyxj+l\.
The function E(x), where E ”{x}) - \ 2E(x) is linear in each interval [x0yxn], is obtained by solving
E"(x) - \ 2E(x) = [E"(x)- X;>’ ] o + [E"(xm ) - X;v,.,](l - 5) 0-19)
where, 5 = (x - Xj)/hjm This is a linear inhomogeneous second-order equation with constant coefficients.
The solution of equation (3.19) consists of the sum of; (I) the solution of the complimentary function of the reduced equation E"(x) - \ 2E(x) = 0 and (ii) a solution particular to the form of the inhomogeneous term, which can be generalized by ax + b. It is relatively simple to verify that the solution to the reduced equation is; E(x) = ^ + C2ex*.
By inspection, the particular solution can only be a polynomial in x and cannot be of a degree higher than one since the equation contains an undifferentiable term E(x). Therefore, assuming that E(x) = ax + ß, then E'(x) = a and E"(x) = 0. Substituting into equation (3.19) yields
- \ 2(ax + ß) = ax + b. Equating coefficients of corresponding powers, then a = - \ 2a and
b = - \ 2ß. The particular solution becomes E(x) = - (ax + b )/\2.
Using the condition that the interpolant passes through the knots, then the complete solution to equation (3.19) is a local representation of the Exponential spline, given by Rentrop (1980) as
PjJx) = Cjg + cßfx - x) + Xj < x < xjfl, 7=1,2, .. . ,«
in which cj0, cjU cj2, cj3, are constants and has the properties; (i) E(x) is an exponential polynomial of degree m — 3 in each interval [xjyxj+l\ and (ii) E(x) E C 2[a,b]. The Exponential spline is also a global interpolant.
Numerical properties of the above equation do not behave very well for the limiting cases,
\j -» 0 and \j oo. It is more convenient to introduce hyperbolic functions which have stable numerical properties. The Exponential spline becomes (Rentrop [1980])
PjJx) =yjJ+yj(
i - * ) + - ^ Sinhfjj.fi)_ x + i Sinhfijjf 1 -5 )) Sinhijij) \ 2 Sinh(Hj) 1 } (3.20)where, dj — E"(xj) are the unknown second derivatives,,/ = 0 ,1 ,...,/i, \x.j = \/ip j = 1
hj = xj+l - Xj and d — (x - x)lhj.
The unknown second derivatives are uniquely determined by satisfying continuity of the first derivative at the knots. Differentiating equation (3.20) and equating the derivatives for adjacent subintervals, for j = 2,..,n - 1, and using suitable boundary conditions produces a definite tridiagonal system of equations for the unknown second derivatives dj.
Using power series expansions for Sink, equation (3.20) reduces to the cubic polynomial over the interval x} < x < xj+l as X, -* 0
= y ,./ + y,(i -5) + y'U h) &_ _6 5 ' 6 7=1,2,
or to a piecewise linear interpolation when X, -* oo, which preserve positivity, monotonicity and convexity of the data. In this case the C 2 property of the Exponential spline is lost. Therefore, it is reasonable to choose the tension parameters to be as small as possible, but sufficiently large to remove unwanted inflection points that are occasionally observed in Cubic splines, thereby preserving the monotonicity of the data.
The Quasi-Characteristic Method 3.14
Selection of the Tension Parameter
Currently there is no analytical expression for the tension parameter. The lack of a general and efficient method for selecting the tension parameters, X, required to produce an interpolant free of extraneous inflection points, has greatly diminished the practical application of Exponential splines. There have been attempts however, to provide approaches for selecting the tension parameters.
In many of the techniques for estimating the tension parameters, a cubic polynomial is fitted,
\j = 0. If the Cubic spline provides a faithful representation of the data, then the procedure will halt. Whereas if the Cubic spline violates the convexity or monotonicity of the data, then sufficient tension is employed to rectify the situation. A new interpolating curve is calculated using the updated tension coefficient consisting of mixed cubics and exponentials.
Cline (1974) used uniform tension parameters which are arbitrarily selected by the user. The maximum value for the tension parameter (X < 50) is restricted to avoid numerical overflow on a computer.
Rentrop (1980) describes a procedure that computes heuristic values for the tension parameters
\j based on the observation that Cubic splines lead to oscillations if y, = yj+l. He found that for
\\j\ > 4. significant differences between the Cubic spline and the Exponential spline occurred, and that for 4 < X7 < 15 satisfactory results were obtained for a number of examples.
The procedure recommended by Rentrop (1980) is: (z) If nothing is known about X; a Cubic spline is computed, (if) Undesired oscillations are detected by comparing the sign of the second derivative dj of the Cubic spline at Xj with the sign of the second difference quotient, A,- - A^. (i/i) Different signs between dj and A; - A;_j, indicate undesirable oscillations and the tension