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

# Using daily values in EMS-Energy+

Greetings everyone,

I would like to use the daily average site temperature as a sensor value in the energyplus EMS.

Though it can be output as a variable I am not being able to use it in the EMS. Any advice?

Best regards. Jevin

edit retag close merge delete

Sort by ยป oldest newest most voted

You can pick up a node temperature using the following sensor. However, this is the instantaneous outdoor temperature, not the daily average outdoor temperature.

EnergyManagementSystem:Sensor,
OATemperatureVariable,             !- Name
OutdoorAirNodeName,   !- Output:Variable or Output:Meter Index Key Name
System Node Temperature; !- Output:Variable or Output:Meter Name


You would have to create an average value yourself using other information from the simulation.

This example shows how to log a trend variable. The number of time steps to "save" in the history is based on the zone time step. If there is 1 time step per hour, the number of zone time steps to save is 24. If there are 6 timesteps per hour, the number of zone time steps to save is 144.

EnergyManagementSystem:TrendVariable,
OATemp, Name
OATemperatureVariable,  !- EMS Variable Name
24; !- Number of Timesteps to be logged


Then in the EMS program average that trend over the number of time steps required to provide the daily average.

SET DailyAverageOATemp = @TrendAverage OATemp 24,


See the EMS example files for more information. Trend variables are exemplified in EMSDemandManager_LargeOffice.idf.

more

Thank you very much for the answer Sir.

The trend variable indeed sums up the previous 144 values but the issue is that the trend value at noon on the second day is the average of 72 values of the previous day and 72 values of the current day.

I am using an adaptive thermal comfort standard which is computed with the daily average temperature and I am trying to use EMS to automatically calculate the number of hours the zones fall our of the comfort range.

( 2016-03-03 23:34:12 -0500 )edit

Is there anyway i could make EMS calculate the daily average , keep that value constant for calculation of thermal comfort of that specific date. Then move on to the next date?

( 2016-03-03 23:36:03 -0500 )edit

I don't think you can use future time data in your equation. You could calculate the daily average temperature and place those values in a Schedule:File. Then read that schedule and use the static daily average data in your EMS routine. See example file 5ZoneTDV.idf for use of the Schedule:File object and external csv file (in the C:\EnergyPlusV8-4-0\DataSets\TDV\ folder if you installed the default path).

( 2016-03-04 07:47:19 -0500 )edit

Thank you very much Sir.

Fed the values with the schedule file and working just the way i want it.

Thank you.

( 2016-03-04 21:54:02 -0500 )edit

The EMS trend variables can be used for this. See the input object called EnergyManagementSystem:TrendVariable and the trend variable function called @TrendAverage.

more

Thank you very much for the answer Sir. The trend variable indeed sums up the previous 144 values but the issue is that the trend value at noon on the second day is the average of 72 values of the previous day and 72 values of the current day. I am using an adaptive thermal comfort standard which is computed with the daily average temperature and I am trying to use EMS to automatically calculate the number of hours the zones fall our of the comfort range.

( 2016-03-03 23:36:26 -0500 )edit

Is there anyway i could make EMS calculate the daily average , keep that value constant for calculation of thermal comfort of that specific date. Then move on to the next date?

( 2016-03-03 23:36:30 -0500 )edit