Skip to main content

Application of Reinforcement Learning in HVAC systems. Part 2


So, how to model an office building to simulate the work of our controller?

In short, I have used the following list of programs: Matlab, EnergyPlus and MLE+ in tandem. First things first, EnergyPlus - is an building simulation engine that will allow you to modulate maybe not all but most of the physical phenomena running inside real physical structures, including heat transfer and temperature spread. Even though it is a quite a hard to understand how to use EnergyPlus if you are not expert (maybe even for civil engineers), you can always download already designed models of a buildings like I did), which can be found on energy.gov site. Therefore, I took one floor three office medium building EnergyPlus model that comes with and .idf and weather files. Basically, the building has three rooms with electric radiant heating floors and one window and some ventilation system. Simple schematics shown on a picture below:
As you may guess, I want to be able to test some controllers on this electric radiant system installed in each office room of our model. Class of radiant heater outlined in picture below for three thermal zones:
Ok, we do have our non-real building, what next? Next, we need to know how we can control that thing (radiant heater). Even though, this system can be controlled within EnergyPlus model body (e.g. via thermostats) we want to impose more sophisticated control on it, right?  Now MLE+, steps into the game. MLE+ is sort of middleware written on Matlab language that serves as intermediate between our building and controller that will be written on Matlab. Here are the screenshot of MLE+ front side:
After you've loaded your .idf and weather files you may want check control section #3 where our future control file will be loaded.
Also, you need to choose variables coming from EnergyPlus model that you will operate with via control file, as depicted on figure below:
Finally, in order to demonstrate the whole concept the last schematic picture explains how the process runs:
Iteratively, EnergyPlus model generates some outputs (we can actually choose which outputs to generate in our .idf file). Out of this output variables via EnergyPlus feature(class) called External Interface allows MLE+ to capture required outputs and process it in the control file that will be written in Matlab. On the next post (part 3) I will explain how I applied Q-learning and SARSA to dvelop controller for the electric radiant heating system in our building. More detailed info on EnergyPlus and MLE+ can be found here https://energyplus.net/ https://github.com/mlab-upenn/mlep_v1.1 Thanks for reading, and leave comments I will be glad answering them!

Comments

  1. Dear Sultan , what matlab version you used and is it 32 or 64 version also what energy plus version 32 or 64 and what Java version I have compatibility problem while making the steps in the manual . any suggestions

    ReplyDelete
    Replies
    1. Hey, as I remember I used matlab 2011 x64 version, energy plus x64 - the same version as in tutorial (old one somwhere 7.~). I dont exactly remember java version but was current for early 2018. I also had compatability problems because developers of MLEP no longer sustaining this product so the best strategy to use exactly the same versions of the programs that they used in tutorial (check the date of tutrial also). Sorry for late reply

      Delete

Post a Comment

Popular posts from this blog

Machine Learning. Part II.

Non-residential building occupancy modeling. Part II. Occupancy classification So dataset was taken from this place . The dataset comprised of different sources: surveys, data logging from sensors, weather, environment variables. Total feature list consist of 118 features and can be grouped as general (occupancy, time), environment (indoor, outdoor), personal characteristics (age, office type, accepted sensation range etc), comfort/productivity/satisfaction, behavior (clothing, window, interaction with thermostat etc ), personal values (choices on different set points). It contains data on 24 occupants whether it private office or joint one, the first task is to implement binary classification of each occupant using some input data from sensors and time. For rapid protoyping I will use python Tensor Flow wrapper Keras along Anaconda framework. First, loading all required libraries from keras.models import Sequential from keras.layers import Dense import numpy ...

Machine Learning. Grid search

How to choose best fit parameters for your ANN or SVM model using scikit learn grid search ? (This topic refers to classification problem). As a beginner, after creating a couple of simple neural networks either via tensorflow or Matlab I was thinking about one question: How do I decide which network architecture (number of layers, neurons) and parameters (epoch number, batch size, optimization algorithms and initialization types) to choose? And actually, this question was answered via Grid Search scikit python library that automatizes process of the best parameters. In example below I tried cover all typical tuning parameters: # Since running GridSearch may be quite time/calculation consuming # I used GPU based tensorflow in order to speed-up calculation import tensorflow as tf from keras.backend.tensorflow_backend import set_session config = tf.ConfigProto() # Defining GPU usage limit to 75% config.gpu_options.per_process_gpu_memory_fraction = 0.75 ...