Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

Setting daily and hourly setpoint temperatures in EMS

asked 2019-08-16 14:28:09 -0600

daniellosg's avatar

updated 2019-08-18 11:51:41 -0600

Hi everyone,

The purpose of this question is to set daily temperatures in Designbuilder. I've been trying many ways to do this, and I actually achieved it by means of overriding the heating and cooling setpoint schedules in EMS, but as a result the model became so heavy and running simulations was quite time-consuming. So, I'm going to specify what I've tried:

By Compact Schedules in Detailed HVAC and Detailed HVAC data

The main problem is that there is a limit in the lenght of compact schedules, so I can't specify setpoints for a number of hours within a day because the lenght is larger than Designbuilder allows. Please see below an example of this.

Schedule:Compact,
  Heating Setpoint,
  Any Number,
  Through: 01/01,
  For: Alldays,
  Until: 7:00, 17.00,
  Until: 23:00, 20.00,
  Until: 24:00, 17.00,
  Through: 01/02,
  For: Alldays,
  Until: 7:00, 17.00,
  Until: 23:00, 20.00,
  Until: 24:00, 17.00, etc.

By overriding the heating and cooling setpoint schedules in EMS

It works, but the model becomes quite heavy and it's so tedious to work with it. Please see below an example of this:

<ForAllOccupiedZones>
EnergyManagementSystem:Actuator,
 R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST,
 FORSCRIPT_ACST,
 Schedule:Compact,
 Schedule Value;
<LoopNextZone>

<ForAllOccupiedZones>
EnergyManagementSystem:Actuator,
  R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_AHST,
  FORSCRIPT_AHST,
  Schedule:Compact,
  Schedule Value;
<LoopNextZone>

EnergyManagementSystem:ProgramCallingManager,
  R_Huesca_Cfa_CATIII_2018_OUT_CTE_Prog,
  BeginTimestepBeforePredictor,
  RHuescaCfaCATIII2018OUTCTEACSTProg,
  RHuescaCfaCATIII2018OUTCTEAHSTProg;

EnergyManagementSystem:Program,
  RHuescaCfaCATIII2018OUTCTEACSTProg,
  <ForAllOccupiedZones>
  IF (DayOfYear == 1) && (CurrentTime < 7),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 27,
  ELSEIF (DayOfYear == 1) && (CurrentTime < 15),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 50,
  ELSEIF (DayOfYear == 1) && (CurrentTime < 23),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 25,
  ELSEIF (DayOfYear == 1) && (CurrentTime < 24),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 27,
  ELSEIF (DayOfYear == 2) && (CurrentTime < 7),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 27,
  ELSEIF (DayOfYear == 2) && (CurrentTime < 15),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 50,
  ELSEIF (DayOfYear == 2) && (CurrentTime < 23),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 25,
  ELSEIF (DayOfYear == 2) && (CurrentTime < 24),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 27, etc.

By overriding the heating and cooling actuators in zone temperature control in EMS

I think this might be the best way to achieve this, but the problem is that, even setting the zone control thermostat to operative temperature, the setpoints are applied to zone mean air temperature. Please see below an example of the EMS script below, and please find attached the output files from the simulation in EP-Launch in the following link, both of them only for the day 01/01:

Link: https://drive.google.com/open?id=1U_V...

<ForAllOccupiedZones>
EnergyManagementSystem:Actuator,
  Cooling_Setpoint_<LoopZoneVariableName>,
  <LoopZoneIDFName>,
  Zone Temperature Control,
  Cooling Setpoint;
   <LoopNextZone>

<ForAllOccupiedZones>
EnergyManagementSystem:Actuator,
  Heating_Setpoint_<LoopZoneVariableName>,
  <LoopZoneIDFName>,
  Zone Temperature Control,
  Heating Setpoint;
   <LoopNextZone>

EnergyManagementSystem:ProgramCallingManager,
  AdaptiveSetpointProgram,
  BeginTimestepBeforePredictor,
   AdaptiveSetpointProgram;

EnergyManagementSystem:Program,
  AdaptiveSetpointProgram,
  if (DayOfYear == 1) && (CurrentTime < 7),
  <ForAllOccupiedZones>
  set Cooling_Setpoint_<LoopZoneVariableName> = 27.35,
  set Heating_Setpoint_<LoopZoneVariableName> = 17,
  <LoopNextZone>
  elseif (DayOfYear == 1) && (CurrentTime < 15),
  <ForAllOccupiedZones>
  set Cooling_Setpoint_<LoopZoneVariableName> = 50,
  set Heating_Setpoint_<LoopZoneVariableName> = 17,
  <LoopNextZone>
  elseif (DayOfYear == 1) && (CurrentTime < 23),
  <ForAllOccupiedZones>
  set Cooling_Setpoint_<LoopZoneVariableName> = 27.35,
  set Heating_Setpoint_<LoopZoneVariableName> = 20,
  <LoopNextZone>
  elseif (DayOfYear == 1) && (CurrentTime < 24),
  <ForAllOccupiedZones>
  set Cooling_Setpoint_<LoopZoneVariableName> = 27.35,
  set Heating_Setpoint_<LoopZoneVariableName> = 17,
  <LoopNextZone ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-08-17 17:11:03 -0600

updated 2019-08-19 12:28:57 -0600

If you want to have the same temperatures set by hour, and the day of the year is not important, then you can set the Through: input field of the Schedule:Compact objects to the end of the year (see below).

Schedule:Compact,
  Heating Setpoint,
  Any Number,
  Through: 12/31,
  For: Alldays,
  Until: 7:00, 17.00,
  Until: 23:00, 20.00,
  Until: 24:00, 17.00;

This way, all days the whole year will follow the same schedule values -- you don't need to define them individually if they follow the same schedule value trends. The same idea also applies to your EMS programs -- if you only need to override setpoints based on hour of the day, then you don't need to include DayOfYear in your EMS program logic (see below).

EnergyManagementSystem:Program,
  RHuescaCfaCATIII2018OUTCTEACSTProg,
  <ForAllOccupiedZones>
  IF (CurrentTime < 7),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 27,
  ELSEIF (CurrentTime < 15),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 50,
  ELSEIF (CurrentTime < 23),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 25,
  ELSEIF (CurrentTime < 24),
   Set R_Huesca_Cfa_CATIII_2018_OUT_CTE_<LoopZoneVariableName>_FORSCRIPT_ACST = 27,
  ENDIF;

If you want to have thermostat control based on operative temperature, I would make sure that you have DesignBuilder's calculation options set correctly for Temperature control. If you are using Simple HVAC then you only set a normal and setback temperature value for thermostats in the Activity tab-- a schedule is only used for the operation of HVAC equipment. For Detailed HVAC, you would select heating/cooling thermostat setpoint schedules for a zone in the HVAC diagram interface. If this all is set correctly, then I would double-check that EMS is overriding the same schedule name that you assigned to the heating/cooling thermostats in the zones.

Side question: If you're only overriding schedule values based on time, and not zone air temperatures or other items that EnergyPlus is calculating each timestep, then I don't think you need EMS at all -- you just need schedules. Unless I'm missing something here ...

UPDATE FOLLOWING COMMENT BELOW

If you want to update a schedule every day in DesignBuilder, and are limited by the number of lines you can define in its Schedule:Compact window, then you may want to examine defining this schedule in a CSV file. EnergyPlus can load external files to use as schedules through the Schedule:File object. While DesignBuilder cannot currently load full IDFs, it can load include "partial IDFs" to combine with the DesignBuilder model. So, if here is the process that I would recommend trying:

  1. Create the Schedule:File object in a partial IDF that reads in the external CSV file defining schedule values. The partial IDF needs to be saved in C:\Users\[Your Name]\AppData\Local\DesignBuilder\EnergyPlus, and the external CSV file likely needs to be in the same folder as well.
  2. Include that partial IDF into the DesignBuilder model
  3. Assign any schedule name to the thermostats in the DesignBuilder model (let's say T_stat_schedule, for example)
  4. Use EMS to read the Schedule:File values from the external CSV as ...
(more)
edit flag offensive delete link more

Comments

Thank you so much for your response, Aaron. I think I didn't explain myself so well. The setpoint temperatures would vary daily, but would not be the same from one day to another. I agree that using schedules is the easiest way, but there is no lenght enough to fit the whole year defining periods within each day. That's why I'm using EMS to either override the schedules, or use the zone control temperature actuators.

daniellosg's avatar daniellosg  ( 2019-08-17 18:22:22 -0600 )edit

@daniellosg Ah, I see. Thank you for clarifying. I've edited my answer above.

Aaron Boranian's avatar Aaron Boranian  ( 2019-08-19 12:29:13 -0600 )edit

I didn't know that EMS could read external CSV files! That's cool! Thank you so much for your response Aaron. I think my problem is solved now.

daniellosg's avatar daniellosg  ( 2019-08-21 00:21:39 -0600 )edit

Hi i am trying to do the same thing, giving daily setpoints in energyplus can it be done just in energy plus only, excluding designbuilder and how to write csv file schedule, i mean is the writing format same as we write in 'schedule:compact' in energy plus

Shweta Lall's avatar Shweta Lall  ( 2020-06-16 23:45:08 -0600 )edit

@Shweta Lall yes, using external CSVs to define schedule data can be done directly with IDFs (EnergyPlus input files) -- you don't have to use an EnergyPlus interface like DesignBuilder. The only syntax that would be different in this post is the < loop statements >, since loops are only in DesignBuilder and not EnergyPlus.

Aaron Boranian's avatar Aaron Boranian  ( 2022-04-10 10:27:59 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

4 followers

Stats

Asked: 2019-08-16 14:28:09 -0600

Seen: 881 times

Last updated: Aug 19 '19