Interpolation, Curve Fitting & Engineering Data Reduction
Interpolation estimates between known information. Extrapolation assumes the trend continues beyond it. Understanding the difference, and choosing the right fitting method, is essential for credible engineering data reduction.
The Engineering Problem
Engineering data is rarely available at the exact point where it is needed. Material stress-strain curves are measured at discrete strain points. Aerodynamic coefficients are computed at discrete Mach numbers and angles of attack. Fatigue data is tabulated at discrete stress levels. Interpolation and curve fitting bridge these gaps — but they also introduce assumptions that can be wrong.
Interpolation vs Extrapolation
Interpolation estimates values between known data points. Extrapolation estimates values beyond the range of known data. Interpolation is generally reliable if the data is well-sampled and the underlying function is smooth. Extrapolation is inherently risky because it assumes the trend observed within the data continues beyond it — an assumption that is frequently wrong in engineering.
Interpolation estimates between known information. Extrapolation assumes the trend continues beyond it.
Interpolation Methods
Several interpolation methods are used in engineering, each with different smoothness, accuracy and computational characteristics. The choice depends on the nature of the data and the required smoothness of the interpolated function.
| Method | Characteristics | Engineering Use |
|---|---|---|
| Linear interpolation | Straight lines between points; continuous but not smooth | Quick estimates; load case interpolation |
| Cubic spline | Smooth curves; continuous first and second derivatives | Material curves; smooth engineering data |
| Piecewise cubic Hermite | Smooth; preserves monotonicity | Monotonic data like S-N curves |
| Nearest neighbour | No interpolation; takes closest value | Discrete categorical data |
Least-Squares Fitting
When data contains noise or scatter — as most experimental data does — interpolation through every point is inappropriate. Least-squares fitting finds the function of a specified form that minimises the sum of squared residuals between the function and the data. The method assumes the noise is random and the chosen functional form is appropriate for the underlying trend.
Least-squares fit: Minimise S = Σ [ yᵢ − f(xᵢ) ]² For linear model f(x) = a + b·x: b = Σ(xᵢ−x̄)(yᵢ−ȳ) / Σ(xᵢ−x̄)² a = ȳ − b·x̄
Engineering Examples
- Material stress-strain curves — spline interpolation for smooth elastic-plastic behaviour
- Aerodynamic coefficient tables — multi-dimensional interpolation across Mach and angle of attack
- Fatigue S-N data — least-squares fit of Basquin equation parameters
- Sensor calibration curves — polynomial or spline fit relating measured voltage to engineering quantity
- Thermal expansion data — interpolation of temperature-dependent CTE values
Overfitting
Overfitting occurs when a fitting model has too many parameters relative to the data, capturing noise rather than the underlying trend. A high-order polynomial through noisy data will pass through every point but will oscillate wildly between them. The fitted curve matches the data exactly but represents the underlying physics poorly. An overfit model will generally predict new data worse than a simpler model.
data → underfit (too simple) → appropriate fit (captures trend) → overfit (captures noise)
COMMON MISTAKE: Fitting a high-order polynomial through noisy engineering data. The curve passes through every point but oscillates between them, representing noise rather than physics.
Choosing the Fit Order
The appropriate complexity of a fitting model depends on the underlying physics, not just the data. A material stress-strain curve has a known shape — linear elastic then plastic — and the fit should reflect that. An S-N fatigue curve is typically log-log linear in the high-cycle regime. Choosing a fitting form that reflects the physics is more important than minimising the mathematical residual.
- Choose a functional form that reflects the known physics of the problem
- Use the lowest order that captures the underlying trend adequately
- Check the fit against data not used in fitting (cross-validation where practical)
- Examine residuals — they should be randomly scattered, not systematic
- Document the fitting form and its range of validity
Implementation Considerations
Most engineering programming environments provide interpolation and fitting functions. SciPy provides scipy.interpolate for splines and scipy.optimize.curve_fit for arbitrary function fitting. MATLAB provides interp1, fit and the Curve Fitting Toolbox. These functions are well-tested, but the engineering judgement of which method and which functional form to use remains with the engineer.
ENGINEERING CHECK: Does the fitted curve make physical sense between data points? A curve that oscillates or behaves unphysically between known points is a warning sign.
Verification
A fitted curve should be verified by comparing against data not used in the fit, by checking that residuals are randomly distributed (not systematic), and by confirming that the curve behaves physically between and beyond the data points.
- Check residuals for systematic patterns — Systematic residuals suggest wrong functional form
- Verify behaviour between data points is physically plausible
- Document the range of validity — beyond which extrapolation begins
- Compare against any available data not used in fitting
Key Takeaways
- Interpolation estimates between known data; extrapolation assumes the trend continues beyond it
- Choose a fitting form that reflects the physics, not just the mathematical residual
- Overfitting captures noise rather than the underlying trend — use the simplest adequate model
- Check residuals for systematic patterns — they reveal a wrong functional form
- Document the range of validity for every fitted curve used in engineering work