Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page

# Capabilities of Table:TwoIndependentVariables object?

I have data points for power for a piece of equipment in terms of Outdoor Air Temperature Drybulb and Outdoor Air Temperature Wetbulb that is a bit sparse. I'm trying to use the Table:TwoIndependentVariables to modify the schedule of an ElectricEquipment using EMS to include the energy usage in the simulation. I have been able to get the IDF file to simulate, but I have been able to output at all correct results. (Usually the same value for the entire simulation.) The documentation needs some updating in the IO Reference, but otherwise the Table:TwoIndependentVariables is fairly straightforward to use. This makes me think that I'm trying to use the object past its capabilities. For instance, my data points are sparse so the interpolation will often be in the middle of a square with the corners having known x,y input and z output.

Can the Table:TwoIndependentVariables do what I need? If yes, I'll try to make a minimal working example of the behavior. If not, could you please recommend another method? I'll provide more detail about what I'm trying to do in that case.

Here is a link to a google drive zip file, which has a fairly minimal working example. A couple small details I should point out: the datacenter.csv file has a comma after the last value instead of a semicolon as in the documentation, and I have dummy variables going into the EMS @CurveValue inputs which might not be necessary. There is an output variable for the modified schedule and ElectricEquipment Watts. The schedule is set to 0 (zero) for the simulation, so the EMS is changing the schedule value, but the value is 1 (one) for the whole simulation.

POST SCRIPT
Make sure to use a "complete data set" and read the Interpolation Method field very carefully in the IO Reference. The documentation for this object does need to be cleaned up as of August 2019, as well as generating an error or warning for data sets that are not a complete, equally spaced XY grid.

edit retag close merge delete

Sort by » oldest newest most voted

Within the table bounds should certainly interpolate. Limiting extrapolation is allowed or limited by choice. If you choose EvaluateCurveToLimits a curve object will be created and you can plot it. You should be able to report the results using report variables or if using EMS, EMS output variables.

A3 , \field Interpolation Method
\type choice
\key LinearInterpolationOfTable
\key EvaluateCurveToLimits
\key LagrangeInterpolationLinearExtrapolation


In your input file you are using LinearInterpolation of table, this will not extrapolate and the curve min/max may be limiting the results. From the IO reference document:

1.57.2.1.3 Field: Interpolation Method

The method used to evaluate the tabular data. Choices are LinearInterpolationOfTable,
LagrangeInterpolationLinearExtrapolation, and EvaluateCurveToLimits. When
LinearInterpolationOfTable is selected, the data entered is evaluated within the limits
of the data set and the following fields are used only within the boundary of the table
limits (i.e., are only used to limit interpolation). A complete data set is required.
For each X variable, entries must include all Y variables and associated curve output (i.e.,
a complete table, no gaps or missing data). Extrapolation of the data set is not allowed.
When LagrangeInterpolationLinearExtrapolation is selected, a polynomial interpolation
routine is used within the table boundaries along with linear extrapolation. Given the
valid equations above, the polynomial order is fixed at 2 which infers that 3 data points
will be used for interpolation. When EvaluateCurveToLimits is selected, the coefficients
(i.e., C in the equations above) of the polynomial equation are calculated and used to
determine the table output within the limits specified in the following fields. If the
following fields are not entered, the limits of the data set are used. A complete table
is not required when using this method, however, a minimum number of data is required
to perform the regression analysis. The minimum number of data pairs required for this
choice is 6 data pairs for both bi-quadratic and quadratic-linear curve types.
If insufficient data is provided, the simulation reverts to interpolating the tabular data.
The performance curve is written to the eio file when the output diagnostics flag

more

@rraustad I put a link to an IDF. Let me know if there's too much clutter to diagnose what's going on and I'll try to clean it up. Thanks!

( 2019-08-28 13:50:04 -0500 )edit

@rraustad I think I found my problem. I did not have a "complete data set" as I didn't include many data points that would never occur, like Outdoor Air Temperature Drybulb less than Outdoor Air Temperature Wetbulb. I still have to remake my data set, but some little test examples gave confirmation. I'll add a couple github issues to clear up the documentation and add an error when the data set is not complete.

( 2019-08-28 16:35:30 -0500 )edit

No need to add a GitHub issue since the lookup tables have been completely refactored in V9.2.

( 2019-08-28 17:09:24 -0500 )edit