Abstract
Suppose we have a constrained set of data and wish to approximate it using a suitable function. It is natural to require the approximant to preserve the constraints. In this work, we state the problem in an interpolating setting and propose a parameter-based method and use the well-known cubic Hermite splines to interpolate the data with a constrained spline to provide with a interpolant. Then, more smoothing constraints are added to obtain continuity. Additionally, a minimization criterion is presented as a theoretical support to the proposed study; this is performed using linear programming. The proposed methods are demonstrated with illustrious examples.
1. Introduction
In the industrial design, it is often required to generate a smooth function approximating a given set of data which preserves certain shape properties of the data such as positivity, monotonicity, or convexity, that is, a smooth shape-preserving approximation [1].
Shape-preserving approximation is a subfield of computer aided design (CAD) and has extensively been applied in various areas of engineering such as ship design, car body design, and aerospace industry; it also plays a crucial role in aerography and even in animation and games. Now, some emerging research fields, such as modern data analysis, mathematical finance, image processing, visualization, and digital watermarking techniques, are putting forward higher standards for curve and surface shape-preserving modeling systems [2].
Here, it is generally assumed that the given data are sufficiently accurate to warrant interpolation, so we focus on the shape-preserving interpolation techniques; however, for more oscillatory data, one may prefer to use other approximation methods such as least squares.
In a shape-preserving interpolation problem, we seek for a smooth curve/surface passing through a given set of data in which we priorly know that there is a shape feature in it and one wishes the interpolant to inherit these features [1, 3–9]. Positivity, monotonicity, and convexity are the basic and fundamental shape features which normally arise in everyday scientific phenomena.
During the past three decades, various shape-preserving interpolation methods have been proposed. In this problem, splines play a crucial role, and every approach to shape-preserving interpolation, more or less, uses splines as a cornerstone.
The shape-preserving problem can be handled using different bases, and innovative techniques have been employed to cope with different aspects of this generally studied problem [10, 11].
A good survey of different approaches for shape-preserving interpolation techniques could be found in [2] and the references therein.
One of the hidden features in a dataset may be its boundedness. This happens, for example, when the data come from a sampling of a bounded function or they reflect the probability or efficiency of a process. Actually, any quantity which is expressed as a percentage of another quantity will necessarily lie between 0 and 100; in this case, the data satisfy , for known bounds and . However, the bounds could be imposed by functions (curves) as well, i.e., for known functions and , the data satisfy . When we recreate the underlying entity by interpolation from the sampled values, we need to ensure that the interpolating curve adheres to these known properties, so we wish to find a function which approximates (fits) the data and is also bounded into ; moreover, as every shape-preserving modeling, we require a reasonable degree of smoothness. Such a problem may have lots of applications, for example, in engineering and data visualization. There is a good review of literature in [12], where Asim and Brodlie have mentioned the advantages and drawbacks of different approaches; they have also modified the knot insertion algorithm proposed in [13]. The Shepard interpolation family [14] have been used by Brodlie et al. in [15] to study this problem.
This article studies the problem in an interpolating setting and takes advantage of cubic splines to visualize the data. It proposes a parameter-based method and uses the well-known cubic Hermite splines to interpolate a constrained data with a cubic spline, which preserves the desired bounds. It furthermore proposes the work to obtain spline by adding more smoothing constraints. Additionally, an energy minimization technique is used to provide and interpolating functions. This is performed using a linear programming technique.
The structure of the study is as follows. In Section 2, the cubic Hermite spline with unknown derivative parameters is used to provide with a interpolant; then, more smoothing constraints are added in Section 3 to obtain continuity. Section 4 deals with more general constraints and studies the case where the constraints are quadratic polynomials. A minimization criterion is presented in Section 5, and Section 6 is devoted for demonstration with illustrious examples.
2. Bounded Cubic Hermite Spline
Consider as a dataset, where are distinct points in real line and are bounded values, say . Without loss of generality, we assume that and , so we wish to find a smooth interpolant on with . For each subinterval , , we define , , and . We state the bounded interpolation problem (C1BIP) as follows.
Problem 1 (C1BIP). For a bounded dataset , where , there is an interpolant which is on and is bounded into .
To answer this question, we use a cubic Hermite spline (CHS) , which is defined in as follows:where are the unknown values. They are the shape parameters, and we use them to force the interpolant to satisfy the bounding conditions, i.e., . Schmidt and Hess [16] have given the necessary and sufficient conditions, for a cubic polynomial, to be positive on an interval. We use a sufficient condition extracted from their results to ensure and .
We assume that for .
Lemma 1 (See [16]). The function on is positive if , where
Corollary 1. If , wherethen on .
Proof. It suffices to apply Lemma 1 on .
Theorem 1. A sufficient condition for the cubic Hermite spline to satisfy is that the set of values fulfills the following system of inequalities:
Proof. The constraints resulted from Lemma 1 and Corollary 1 must be applied to each subinterval. The value of is affected by only the first interval constraints, so it suffices to satisfy (4). For every , one must consider restrictions of two consecutive subintervals, namely, and . So, there are 4 restrictions on as follows:(i)Applying Lemma 1 on forces (ii)Applying Corollary 1 on forces (iii)Applying Corollary 1 on forces (iv)Applying Lemma 1 on forces These inequalities must be satisfied simultaneously, so inequalities (5) is the natural presentation of these constraints. The case of is similar to .
Definition 1. The set of all points satisfying inequalities (4)–(6) is defined to be the feasible region of the cubic Hermite spline method for C1BIP.
Lemma 2. The feasible region of the Definition 1 is nonempty.
Proof. For each , we should verify that the lower bound of the corresponding constraints, from inequalities (4)–(6), is actually lower than the upper bound. This is obvious due to the assumption . In inequalities (4)–(6), every lower bound is a nonpositive value, while each upper bound is nonnegative.
The following theorem is a straightforward result of Lemma 2.
Theorem 2. For any dataset , there exists a cubic Hermite spline interpolant, in the form of equation (1), which provides a solution to Problem 1.
Remark 1. Any point in the feasible region, presented by inequalities (4)–(6), provides with a solution to Problem 1. One may choose each to be the middle point of the corresponding feasible interval. In the next section, we seek for optimal solutions which provide with more smooth and visually pleasing solution curves.
3. Bounded Cubic Hermite Spline
The cubic Hermite spline (1) provides a family of solutions to Problem 1. Any set of from the feasible region results in a bounded interpolant. We can impose more restrictions on values to obtain interpolants with desired properties. Imposing the continuity property, the second derivative of must be continuous at each interior point , :
The system of linear equation (7) with inequalities (4)–(6) forms a set of constraints. To find a feasible solution, one can solve a linear programming problem subjected to these constraints. So, a question of feasibility arises here: “does a solution to the system (7) satisfies in (4)–(6)?” This is dependent upon values; here, we state a sufficient condition.
Lemma 3. If forms a uniform partition and for all (or, respectively, ), then solution to the linear system (5) satisfies the inequalities (4)–(6).
Proof. Using notation , one can rewrite equation (7) asOne should verify that equation (8) is feasible subject to constraints (4)–(6). We assume satisfy (4)–(6). Taking advantage of equationsone can representFor , equation (5) leads to the following restrictions:which results inNow, for the feasibility of equation (8), it remains to verifyHere, we add the assumptions for all , which leads toThe latter inequality is obvious due to our assumption for values. Similar calculations can be used to verify (14). Using inequalities (4) and (6), respectively, one can easily handle the feasibility for and .
4. Constraining Cubic Hermite Interpolation
Problem 2. For a constrained dataset , where is bounded by two curves and , i.e., , there is an interpolating function which is also constrained by and , i.e.,
We consider the case where and are, at most, quadratic polynomials and set some sufficient conditions on the cubic Hermite spline (1) to fulfill condition (16).
Denotingone can rewrite the constraining conditions in two positivity conditions:
Applying Lemma 1, we have the following result:
Theorem 3. A sufficient condition for the interpolating cubic Hermite spline (1) to be constrained by and (16) is to satisfy the following conditions:
For getting more smoothness, one can easily add continuity conditions, and the reasoning is the same as the bounded case.
5. Energy Minimization Technique
So far, we have solved the bounded and constrained interpolation problems, and we know that there does exist as well as solutions to these problems. However, in both cases, there may exist a number of solutions; so, a matter of choosing the “optimal solution” arises here. Moreover, to get an explicit result, one has to solve a linear programming problem.
The energy minimization method has successfully been used by Burmeister et al. [17] to obtain an interpolating spline with minimum energy. It is generally based on minimizing the curvature of the spline which is represented by
Wolberg and Alfy [18] have proposed different, but closely related, quantities to express the energy of a spline. They introduced an energy measure based on the second derivative discontinuities:
They have simplified the discontinuity energy measure, , to be linear with the first derivatives, so that a linear programming procedure can be applied. The simplification is performed by using the absolute values of the discontinuities:
For each discontinuity point, they define a slack variable, , whose value is forced to be the absolute value of the discontinuity, using the following inequality constraints:
can be written as
Here, we use the same techniques and try to reach suitable splines in two stages. We state the idea for bounded case, and then, it can be easily extended to a constrained case. First, we put as an objective function and minimize its subject to the following constraints.(i)Absolute value constraints: equation (23)(ii)Boundedness constraints: equations (4)–(6)
The mentioned linear programming (LP) problem could be handled by any LP-solver. The solution to this LP is a vector of values , and now, we have a solution to Problem 1 (C1BIP).
At this point, we can switch to the second stage. reflects the sum of discontinuities in the second derivative; so, whenever it has a relatively small value, we hope that we are close to a solution. Having the solution of the mentioned LP at the hand, we try to reach a solution as well. To do so, we add the continuity constraints, i.e., equation (7) to the set of constraints. This time, we use from equation (21) as an objective and minimize its subject to the following constraints:(i)Boundedness constraints: equation (4)–(6)(ii) continuity conditions: equation (7)
This is a nonlinear programming problem and needs a starting guess; we use the solution of the mentioned LP as the starting point.
6. Examples and Illustrations
In previous sections, the bounded and constrained cubic Hermite spline problems (Problems 1 and 2) have been transformed to a linear programming problem which can be easily handled in MATLAB. To reach a smoother solution, the continuity constraints were put in a nonlinear programming problem, which also can be solved by MATLAB using “fmincon” function. The maximum vector norm of MATLAB with a discretization is used to compare the errors. We illustrate these results through some examples: the first group of examples confined to bounded interpolation and the second group presents the constrained case.
6.1. Bounded CHS Examples
Example 1. We consider the dataset in Table 1.
This is a uniform sampling of the semicircle described by the function on . The solution as well as the original curve is illustrated in Figure 1. It is seen that the maximum error is 0.0551. The solution is more pleasing and is reported in Figure 2. The maximum error in this case reduces to 0.0531. Table 2 represents the maximum error for both solutions in each subinterval.


Example 2. Table 3 presents a data sampled from the functionThese data are oscillatory and do not fulfill the conditions of Lemma 3; however, the cubic Hermite solutions are convincing enough. The solution as well as the original curve is depicted in Figure 3. It is seen that in case, the maximum error is 0.0193. Table 4 presents the errors for each interval in both and cases.
In the solution, the maximum error is 0.0195, and it is depicted in Figure 4.


Example 3. Consider the data given in Table 5, which come from the burning of coal in a furnace: the values are the percentage of oxygen in flue gas over a range of time. If we visualize these data by cubic spline, it would give a pleasing smooth curve, but it is unfortunately physically nonsense since it generates negative percentages. This problem have been handled in [12] by Hermite and rational splines, and they have reported positive interpolants. Qin and Xu [19] got advantage of a trigonometric spline to propose a positivity preserving approximation. Here, the proposed method provides with a interpolant where its curve lies completely between maximum and minimum values of percentage (Figure 5).

6.2. Constrained CHS Examples
Example 4. Dataset in Table 6 is a sampling ofon a uniform partition in . We wish to find the corresponding interpolant which lies between and . The resulted solution curve has the maximum error 0.1733 and is depicted in Figure 6. The solution is obtained by the energy minimization technique and has the maximum error 0.0120, which is very convincing and shows that this technique provides a smooth solution with lesser error. Figure 7 is the solution; in both figures, the solid line refers to the interpolant, the dotted curve is the original function, and the dashed lines are constraining functions.
The ordinary cubic spline also could be used to solve this interpolating problem, but it may not fulfill the constraining conditions. However, in this example, the spline solution satisfies the constraints. Here, the and Hermite cubic solutions can be compared with the ordinary spline solution which is obtained by MATLAB. Table 7 provides the corresponding errors in subintervals. According to this report, the solution gives a more satisfying result. Also, the solution competes well enough. However, in cases where the constraints are tighter, the Hermite spline solutions, both and , are comparably better than ordinary spline solution.


Example 5. In this example, we intend to make more restricting conditions. Consider the function in the interval , and we have a sample of this function in Table 8. It is aimed to find an interpolant which is bounded by curves and as lower and upper constraints.
These curves and the original function as well as the and CHS solutions are shown in Figures 8 and 9, respectively.


7. Concluding Remarks
A special kind of shape-preserving approximation which deals with bounding constraints has been addressed; although it has partially been studied in the literature [12], we propose a linear programming approach and use energy minimization techniques to gain continuity. Quadratic constraints are handled, which give the positivity and linear constraints a special case.
It should be mentioned here that the bounded interpolation problem may be considered as a piecewise monotonic interpolation. In every subinterval, we may select a suitable function which preserves the monotonicity. This is a problem which has extensively been studied [18]. But a monotone solution may not be a suitable approximation for a bounded phenomenon, and the monotone interpolant cannot reach values outside the minimum and maximum of the sampling. This drawback was our motivation to seek for a really bounded approximation.
It is worth indicating two experimental results:(i)The constrained/bounded cubic Hermite spline is a promising technique for interpolating scattered data(ii)The energy minimization technique is a convincing tool to gain more smoothness and reduce the approximation error
Data Availability
The data used to support the findings of this study are included within the article.
Conflicts of Interest
The authors declare that there are no conflicts of interest.