Lookup Tables[LINK]
Lookup tables provide a method to evaluate a group of data that may or may not conform to a fundamental equation. Lookup tables can interpolate the actual data using a linear interpolation or piecewise cubic spline using the Btwxt library (https://github.com/bigladder/btwxt). As with curve objects, the lookup table can be used anywhere a valid curve object name is allowed so long as they share the same number of independent variables. Care must be taken to ensure the table data format is consistent with the associate model that is using the performance curve (e.g., DX cooling coil capacity as a function of temperature where independent variable X1 = indoor wet-bulb temperature and independent variable X2 = outdoor dry-bulb temperature).
A lookup table can be specified to use either linear or cubic interpolation independently for each dimension (input variable). For performance points outside the defined grid space, an extrapolation method–constant or linear–can be set independently for each dimension. Finally, each axis can have specified boundaries beyond which extrapolation is not permitted.
Linear Interpolation[LINK]
For linear interpolation in 1 dimension, given known values of f at x0 and x1, and a point x between x0 and x1, the value at x is estimated by:
f(x)=(1−μ)⋅f(x0)+μ⋅f(x1)
where μ is the location of x expressed as a fraction of the distance between x0 and x1:
μ=(x−x0)/(x1−x0)
Cubic Spline Interpolation[LINK]
The general formula for a 1-dimensional piecewise cubic spline (for x between known values f(x0) and f(x1)) is:
f(x)=(2μ3−3μ2+1)⋅f(x0)+(−2μ3+3μ2)⋅f(x1)+(μ3−2μ2+μ)⋅f′(x0)+(μ3−μ2)⋅f′(x1)
The Catmull-Rom cubic spline interpolation defines the derivatives f′(x0) and f′(x1) as the slope between the previous and following grid points on the axis:
f′(x0)=(f(x1)−f(x−1))/(x1−x−1)f′(x1)=(f(x2)−f(x0))/(x2−x0)
When the hypercube is at the edge of the grid, Catmull-Rom simply extends the slope of the final segment for defining the slope terms: i.e., if there is no x−1, we substitute x0 into the f′(x0) formula.
If a mix of interpolation methods are specified among the included dimensions, the interpolator will perform that mix as requested. If the lookup point is beyond the grid edge on any axis, the interpolator will perform the requested extrapolation method (linear or constant) on that dimension while proceeding with interpolation along any in-bounds dimension. If a “do-not-extrapolate-beyond” boundary is specified, the interpolator will perform a constant extrapolation from that boundary outward (in that dimension), and it will return the resulting numerical answer along with a warning that the request was outside the boundaries.
Lookup Tables[LINK]
Table:Lookup[LINK]
Lookup tables provide a method to evaluate a group of data that may or may not conform to a fundamental equation. Lookup tables can interpolate the actual data using a linear interpolation or piecewise cubic spline using the Btwxt library (https://github.com/bigladder/btwxt). As with curve objects, the lookup table can be used anywhere a valid curve object name is allowed so long as they share the same number of independent variables. Care must be taken to ensure the table data format is consistent with the associate model that is using the performance curve (e.g., DX cooling coil capacity as a function of temperature where independent variable X1 = indoor wet-bulb temperature and independent variable X2 = outdoor dry-bulb temperature).
A lookup table can be specified to use either linear or cubic interpolation independently for each dimension (input variable). For performance points outside the defined grid space, an extrapolation method–constant or linear–can be set independently for each dimension. Finally, each axis can have specified boundaries beyond which extrapolation is not permitted.
Linear Interpolation[LINK]
For linear interpolation in 1 dimension, given known values of f at x0 and x1, and a point x between x0 and x1, the value at x is estimated by:
f(x)=(1−μ)⋅f(x0)+μ⋅f(x1)
where μ is the location of x expressed as a fraction of the distance between x0 and x1:
μ=(x−x0)/(x1−x0)
Cubic Spline Interpolation[LINK]
The general formula for a 1-dimensional piecewise cubic spline (for x between known values f(x0) and f(x1)) is:
f(x)=(2μ3−3μ2+1)⋅f(x0)+(−2μ3+3μ2)⋅f(x1)+(μ3−2μ2+μ)⋅f′(x0)+(μ3−μ2)⋅f′(x1)
The Catmull-Rom cubic spline interpolation defines the derivatives f′(x0) and f′(x1) as the slope between the previous and following grid points on the axis:
f′(x0)=(f(x1)−f(x−1))/(x1−x−1)f′(x1)=(f(x2)−f(x0))/(x2−x0)
When the hypercube is at the edge of the grid, Catmull-Rom simply extends the slope of the final segment for defining the slope terms: i.e., if there is no x−1, we substitute x0 into the f′(x0) formula.
If a mix of interpolation methods are specified among the included dimensions, the interpolator will perform that mix as requested. If the lookup point is beyond the grid edge on any axis, the interpolator will perform the requested extrapolation method (linear or constant) on that dimension while proceeding with interpolation along any in-bounds dimension. If a “do-not-extrapolate-beyond” boundary is specified, the interpolator will perform a constant extrapolation from that boundary outward (in that dimension), and it will return the resulting numerical answer along with a warning that the request was outside the boundaries.
Documentation content copyright © 1996-2024 The Board of Trustees of the University of Illinois and the Regents of the University of California through the Ernest Orlando Lawrence Berkeley National Laboratory. All rights reserved. EnergyPlus is a trademark of the US Department of Energy.
This documentation is made available under the EnergyPlus Open Source License v1.0.