Giter Site home page Giter Site logo

pydmpc's Introduction

E.ON EBC RWTH Aachen University

pyDMPC

Overview

Distributed model predictive control (DMPC) is a promising approach that avoids the construction of a complex model of the total system and thus facilitates modelling and supports the use of exact simulation models.

DMPC divides the optimization problem into sub-problems, with the advantage that pre-fabricated simulation models from standard libraries and models provided by component manufacturers can be used. Moreover, each optimization problem, considered for its own, becomes smaller and, in whole, can be solved faster compared to an integrated system model.

The distributed optimizations must be coordinated to achieve near-global-optimum performance. This coordination requires a suitable scheme, which, in many publications, is based on iterative data exchange between the subsystems. In previous works, the authors developed a non-iterative algorithm based on the exchange of lookup tables.

The developed control framework is able to construct a system composed of subsystems merely on the basis of a configuration file. Using the information provided in the configuration file, the specified system is generated as an object of the system class. This class, in turn, is equipped with a method for generating subsystems, in which all given characteristic attributes are assigned to the corresponding subsystem object. Important attributes of a subsystem include, e.g., any kind of constraints, names of decision variables and the hierarchical position.

The control framework furthermore includes a module containing the specific control algorithm. At the moment, one may choose between the sequential algorithm working with look-up tables and the iterative one. By including a further module, the objective function is integrated into the control algorithm. This module contains an interface, which starts the subsystem model simulation.

Installation

If you actively develop pyDMPC you can clone this repository by using:

git clone [SSH-Key/Https]

and then run:

pip install -e [Path/to/your/pyDMPC/Clone] which will install the local version of pyDMPC.

Dependencies

If you intend to use Modelica models: pyDMPC currently works with the Dymola Python interface.

  • fmpy
  • modelicares
  • pyads

Documentation

The control approaches are described in Introduction.

The settings are done in the Init.py and are described in Settings

How to cite pyDMPC

We continuously improve pyDMPC and try to keep the community up-to-date with citable papers:

  • Comparative study of neighbor communication approaches for distributed model predictive control in building energy systems. Baranski M., Meyer, L., Fütterer J., Müller D.. Energy and Buildings. DOI

pydmpc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pydmpc's Issues

PIDModels

Add Modelica models of the AHU containing PID controllers as reference.

correctNCDMPC

The implementation of the NC-DMPC algorithm requires major revision.

addCitablePaper

The readme requires a citable paper prior to upload of the code.

switchAlgorithms

Add the following to instructions:
Change both the algorithm type and the sync rate should be equal to the optimization interval

Should also change model.set(Init.names_DVs[4-l], val)

addLicense

Evaluate license options, probably MIT would be suitable.

includeExternals

There are a couple of external dependencies that should be included. Moreover, the algorithms should create all folders automatically. As a result, each user should be able to run the algorithm just by adapting the Init file.

initialize

Before measurements are taken, the FMU should do one step to avoid initialiation effects

adaptInit

The init file should be changed to be able to excecute the test models.

sendCommands

Check the methods for sending commands to the controlled system.

addControlFramework

The control framework exists in a local repo. It should be added and generalized.

addSetup

Ensure that the package can be installed using pip.

addEnergyCost

Add cost calculation depending on real effort (money, entropy). The HRC system should not create cost.

addMockupModels

Add mockup models in order to allow testing the control framework.

gitattributes

Add the file to ensure that the repo is classified correctly.

commandAll

The variable command_all needs to be overwritten at the beginning of each iteration step.

bexmoc_iter

In the new structure previously merged into the master, there is only the bexmoc_seq algorithm. Therefore, the iterative algorithm should be included.

useWooey

Wooey is a nice browser-based UI that could be used nicely in pyDMPC.

initSyntaxError

There are ] missing in Init and the variable time_step in test_main is not initialized.

addChoiceOfFMU

It should be possible to decide if the FMU is generated automatically or if an exisiting FMU is used.

addDoc

Add the missing documentation.

simplifyHRC

The heat recovery system should be simplified.

correctTestModels

There cooler test model has an additional gain that should be removed.

entropyOptimization

What is the problem?

  • For entrop-based optimization, new Modelica models are required

measurements

The measurements should be performed by each subsystem.

adaptPsychrometrics

The absolute humidity should be a fixed input and the heat recovery system should e exchanged to enable a stronger recovery effect.

prepareNewUseCase

For the new use case of a test hall automation, some changes are required:

  • Support for parallel subsystems

  • Introduction of linear functions and fuzzy controllers

  • Improvement of documentation

geoCaseStudy

Create a case study for geothermal energy based on the master branch.

oop

The control framework shall become more object-oriented. Therefore, lots of functions can become methods of dedicated classes.

inlcudeFMU

Allow to include a FMU as controlled system.

includeDetailedModels

Include physical models to have a more realisitc case study. This will require some changes in the code and also in the simple models.

entropyAgents

For the test with the mixed entrop cost function, add a dedicated sub-package that can later be included into the main control framework.

PR43

#43 There are some smaller changes required for the PR, namely

  • Working diectory naming

  • Hard-coded values

adaptOptimization

Instead of COBYLA, the SLSQP solver should be used and the intervals of the brute force algorithm should be decreased.

useCostTolerance

There should be a tolerance period to ignore initialization effects.

choiceOfExport

It should be possible to decide if a measurement is exported to a file or not.

totalModelAHU

In order to compare the distributed approaches to a non-distributed case, we require some changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.