Unmet Hours - RSS feedhttps://unmethours.com/questions/Question-and-Answer Resource for the Building Energy Modeling CommunityenWed, 28 Aug 2019 17:09:24 -0500Capabilities of Table:TwoIndependentVariables object?https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-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](https://drive.google.com/file/d/1ZdxRdu_q5ipvzGCQVA5pHSBQ938k0b8t/view?usp=sharing), 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<br>
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.Wed, 28 Aug 2019 13:02:16 -0500https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/Answer by rraustad for <p>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.</p>
<p>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.</p>
<p>Here is a link to a <a href="https://drive.google.com/file/d/1ZdxRdu_q5ipvzGCQVA5pHSBQ938k0b8t/view?usp=sharing">google drive zip file</a>, 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.</p>
<p>POST SCRIPT<br>
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.</p>
https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?answer=40122#post-id-40122Within 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
DisplayAdvancedVariables is used (ref. Output:Diagnostics, DisplayAdvancedVariables).Wed, 28 Aug 2019 13:09:49 -0500https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?answer=40122#post-id-40122Comment by rraustad for <p>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.</p>
<pre><code>A3 , \field Interpolation Method
\type choice
\key LinearInterpolationOfTable
\key EvaluateCurveToLimits
\key LagrangeInterpolationLinearExtrapolation
</code></pre>
<p>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:</p>
<pre><code>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
DisplayAdvancedVariables is used (ref. Output:Diagnostics, DisplayAdvancedVariables).
</code></pre>
https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?comment=40131#post-id-40131No need to add a GitHub issue since the lookup tables have been completely refactored in V9.2.Wed, 28 Aug 2019 17:09:24 -0500https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?comment=40131#post-id-40131Comment by mldichter for <p>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.</p>
<pre><code>A3 , \field Interpolation Method
\type choice
\key LinearInterpolationOfTable
\key EvaluateCurveToLimits
\key LagrangeInterpolationLinearExtrapolation
</code></pre>
<p>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:</p>
<pre><code>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
DisplayAdvancedVariables is used (ref. Output:Diagnostics, DisplayAdvancedVariables).
</code></pre>
https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?comment=40123#post-id-40123@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!Wed, 28 Aug 2019 13:50:04 -0500https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?comment=40123#post-id-40123Comment by mldichter for <p>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.</p>
<pre><code>A3 , \field Interpolation Method
\type choice
\key LinearInterpolationOfTable
\key EvaluateCurveToLimits
\key LagrangeInterpolationLinearExtrapolation
</code></pre>
<p>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:</p>
<pre><code>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
DisplayAdvancedVariables is used (ref. Output:Diagnostics, DisplayAdvancedVariables).
</code></pre>
https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?comment=40127#post-id-40127@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.Wed, 28 Aug 2019 16:35:30 -0500https://unmethours.com/question/40120/capabilities-of-tabletwoindependentvariables-object/?comment=40127#post-id-40127