Truong X. Nghiem

MLE+: a Matlab-EnergyPlus Co-simulation Interface

© 2010-2014 by Truong X. Nghiem.

Notice

This page is about the legacy version of MLE+. This software has retired since 2015 and is no longer updated or supported. This page is kept to provide documentation and code archive of the software, since it can still be useful. Questions about MLE+ are unlikely to be answered, especially basic ones, but there might be exceptions.

There is a fork of MLE+ currently hosted by the Real-time and Embedded Systems Laboratory (mLab) at the University of Pennsylvania, at http://mlab.seas.upenn.edu/mlep, in which I was involved initially. The fork provides a Matlab graphical user interface on top of the core of MLE+. Note that I do not provide support for nor endorse this fork of MLE+.

There are several alternatives to MLE+ that are being actively developed. To name a few:

  • BCVTB : however, in my opinion, this software has several limitations (outlined below), which was the reason why I developed MLE+ in the first place.

  • openBuildNet is a new large-scale distributed co-simulation and computation platform which I have been developing at EPFL. The software follows a similar approach as did MLE+, hence it has all the advantages that MLE+ has over BCVTB. But it is much better and well designed for general use. Building energy co-simulation with EnergyPlus and Matlab is just a special application of openBuildNet. It will be a breeze to connect Matlab, Python, C/C, EnergyPlus, etc. in a large-scale co-simulation. At this moment, openBuildNet is still in closed development. I will update this page (and of course the openBuildNet website) once the software is released to the public.

A short report on MLE+.

Contents

MLE+ is a Matlab toolbox for co-simulation with the whole-building energy simulator EnergyPlus. It is designed for engineers and researchers who are familiar with Matlab and Simulink and want to use these software tools in building energy simulation. MLE+ is particularly useful for:

  • Controller design: the energy simulation is carried out by EnergyPlus while the controller is designed and implemented in Matlab or Simulink.

  • Simulation and data collection: a large number of simulations, with different scenarios, can be carried out and their data is collected, stored and processed in Matlab. The data can then be used for various purposes, e.g. for learning a model of the building system.

  • Simulation-based optimization: a non-linear optimizer, e.g. one in the Matlab's Global Optimization Toolbox, can be used to find optimal parameters or control sequences of the building system, by considering the building as a black-box whose execution is performed by simulations by EnergyPlus.

MLE+ toolbox provides a set of Matlab functions and classes, as well as a Simulink library, for performing co-simulation with EnergyPlus.

Currently, EnergyPlus versions up to v8.0 are supported.

Comparison with BCVTB

BCVTB (Building Controls Virtual Test Bed) is a software environment for coupling different simulation programs for distributed simulation. It is based on the Ptolemy II software environment and is developed at the Lawrence Berkeley National Laboratory.

The co-simulation feature in EnergyPlus was originally developed for BCVTB, however the communication protocol is open and can be used by any program to perform co-simulation with EnergyPlus. MLE+ is an example of such programs.

Although Matlab/Simulink can be coupled with EnergyPlus via BCVTB, its full functionality cannot be used because it is only called by BCVTB as a client. For example, interactive execution and debugging Matlab code are not possible. In fact, if the Matlab code or the Simulink model has an error, it is much more difficult to find and fix it with BCVTB than with MLE+ (which runs in the standard Matlab environment). Furthermore, for users who mostly work with Matlab/Simulink and have never used Ptolemy, learning a new environment as Ptolemy is time-consuming and might not be worthwhile.

Advantages of BCVTB over MLE+ include:

  • It is always up-to-date with the co-simulation feature in EnergyPlus.

  • It can be used to couple other programs besides EnergyPlus and Matlab/Simulink, such as Modelica and Radiance. However, in the future, MLE+ will incorporate interfaces to these programs as well.

  • It is free, open-source and runs on Java. Note that MLE+ is also free and open-source, but it requires Matlab/Simulink which are commercial.

Advantages of MLE+ over BCVTB include:

  • It takes full advantage of the Matlab/Simulink environment, including interactive simulation, code debugging, low-level co-simulation API (Application Programming Interface), code generation, and all available toolboxes. In other words, it integrates better with the Matlab/Simulink environment.

  • It is easier to extend MLE+, using Matlab programming, for specialized applications and functions. An example is large-scale optimization of building's design parameters using parallel simulations (with Matlab's Parallel Computing Toolbox and Distributed Computing Server). Another example is a GUI for rapid development of building controllers, be it a simple PID controller or a complex Model Predictive Controller.

  • It is familiar to users who mainly use Matlab/Simulink, such as control engineers.

Developers

MLE+ is developed by Truong X. Nghiem.

Screenshots

Below are several screenshots of MLE+ 1.0.

A Simulink model with MLE+ block simulates a building and a controller which computes the zone temperature set-points.

MLE+ in Simulink

A plot of results of the same system simulated by plain Matlab code using MLE+ functions and class.

MLE+ in Matlab code

Use cases

I plan to publish a list of real use cases of MLE+ on this website. If you have successfully used MLE+ in your research or application, and you want to share your story, please email me.

Change History

  • 2012/04/23: MLE+ development was split into 2 branches: MLE+-legacy (the old toolbox for co-simulation with EnergyPlus) and MLE+ (new toolbox with more functionalities). MLE+ now supports EnergyPlus 7.0.0. Also the development was moved from github to bitbucket due to a problem with the github system.

  • 2012/01/12: website is updated; MLE+ development is hosted on github (removed); (partially) fixed an error of MLE+ running on Windows.

  • 2011/02/01: MLE+ 1.0 r16 is released; fixed a problem with the dimension of input ports of the E+ Simulink block.

  • 2010/11/24: MLE+ 1.0 is released.

Download

The development of MLE+ is hosted on bitbucket.

  • Browse the source code of the toolbox.

  • Download an archive file of the source code of the toolbox.

  • Occasionally, official release of the toolbox may be available on this site. For now, there is no official release.

Documentation and Support

MLE+ has retired and is no longer supported. Its old manual is archived at this address. The old Google group for MLE+ questions and support was closed.

Citing MLE+

Willy Bernal, Madhur Behl, Truong X. Nghiem, and Rahul Mangharam. “MLE+: a tool for integrated design and deployment of energy efficient building controls.” In Proceedings of the Fourth ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Buildings, pp. 123-130. ACM, 2012.

BibTeX code
@inproceedings{bernal2012mle+,
  title={MLE+: a tool for integrated design and deployment of energy efficient building controls},
  author={Bernal, Willy and Behl, Madhur and Nghiem, Truong X and Mangharam, Rahul},
  booktitle={Proceedings of the Fourth ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Buildings},
  pages={123--130},
  year={2012},
  organization={ACM}
}

License

MLE+ is open-source software. You are free to use it however you like. You may redistribute it. You may modify it to suit your need.

If you redistribute MLE+ or derive your work from MLE+, you should give credit to the authors by including their names and/or a link to the website of MLE+. You are encouraged to share any derivative work.

Disclaimer: MLE+ IS DISTRIBUTED WITHOUT ANY WARRANTY. THE AUTHORS MAKE NO EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE SOFTWARE. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES CAUSED BY USING THE SOFTWARE.