Although EnergyPlus provides an encyclopaedic range of modelling capabilities, every project is different and some may require special simulation functionality not provided in the standard engine. The EMS provides custom control and modelling routines to override selected aspects of EnergyPlus behaviour. A simple programming language called EnergyPlus Runtime Language (Erl) is used to describe the control algorithms. EnergyPlus interprets and executes the Erl program as the model is being run. Thus the EMS provides a powerful way to extend the capability of EnergyPlus without the need to become an expert in programming the EnergyPlus source code.
This help on the DesignBuilder EMS is intended to be read together with the main EnergyPlus EMS application guide which provides most of the information required to understand how to use EMS with detailed descriptions and examples.
The Energy Management System (EMS) is one of the high-level control methods available in EnergyPlus. An EMS is able to access a wide variety of “sensor” data and use this data to direct various types of control actions. The original concept was to emulate, inside EnergyPlus, the types of controls possible with the digital energy management systems used in real buildings. However there are many other application for the EMS including:
The EMS allows the functionality of many of the existing high-level control objects to be overriden. For example the EMS can:
The EMS uses the concept of sensors to obtain information from elsewhere in the model for use in control calculations. Actuators are the mechanism for influencing changes on the model and code is written to tell the Erl processor how to apply the control laws.
Sensor objects are used to declare Erl variables which are linked to EnergyPlus output variables or meters. Actuators map Erl variables to control actuators elsewhere in EnergyPlus. The EMS then initiates control actions by changing the value of this variable inside an Erl program.
The way it works is probably best understood by studying working EMS scripts such as those provided by DesignBuilder alongside this documentation and that in the EnergyPlus EMS application guide.
Note: EMS is an advanced feature of EnergyPlus and is not for beginners. To use it you will need to be comfortable writing your own custom code and have a thorough understanding of how you want your models to behave. If you are intimidated by the idea of writing programs to adjust the fine details of how an EnergyPlus model runs then EMS is probably not for you. However, if you relish the idea of being able to write code to override default behaviour, you will find that EMS can help you model many features to your exact specification, significantly extending EnergyPlus' normal range of capabilities.
DesignBuilder includes some important extensions to the standard EnergyPlus EMS and Erl system allowing DB EMS programs to reused and shared:
The DesignBuilder EMS functionality can be accessed from the Tools > EMS and FMU menu option which opens the External Interface Program Manager dialog.
Previously created EMS programs are listed on the data panel to the right. These can be selected, copied, deleted and edited:
Two steps are required to enable an EMS program:
Note: Selecting an EMS program on the External Interface Program dialog is not enough to ensure its script is included in the simulation - the Enable program checkbox is the important setting.
DB Erl scripts are defined on the EMS Program edit dialog which provides utilities for quickly adding template script for new sensors, actuators, internal variables and programs.
As well using EMS for advanced control and customisation you also use the system to include simple additional IDF script in the model. This is an easy way to add more outputs or to add HVAC or other EnergyPlus IDF objects not yet supported by DesignBuilder. It offers a more flexible approach than the Include IDF option on the Model and Simulation options dialogs as EMS includes the IDF data within the dsb file making it completely portable. Also you can store and manage a list of various IDF datasets with EMS which makes it easier to include/exclude various models and/or outputs very easily.
It is possible to write quite complex EMS programs and there is plenty of scope for making mistakes, which can take time to track down and fix. Please be aware that the DesignBuilder Support Desk is not generally able to offer a free service for debugging or advising on the possible cause of errors in EMS programs. See the Support Desk Policy.
The EnergyPlus EMS application guide provides a section on debugging EMS programs which is a good starting point for tracking down problems.