The main aim of this application is to show a workflow for building and choosing an optimal microgrid design (topology and components selection) based on consumer types and the selected area. The second aim is to come up with a suitable control strategy, allowing us to minimize the investment price.
The application mainly solves two problems:
Optimal operation of microgrids
Optimal design of microgrids
These two objectives can also be combined into a single problem, i.e. solving for the optimal operation of a microgrid with optimal design.
What is the Microgrid good for?🔗
Most of the time, we rely on the traditional power grid as our main energy source. But when massive blackouts occur, organizations, and communities need to rely on power systems that are secure and flexible.
Moreover, renewable energy sources like wind, photovoltaic power-plants and others do not provide constant power output and they are dependent on the weather, causing power fluctuation to the power grids.
Microgrids — which operate as part of the traditional grid or independently — are an ingenious solution that can lead to fewer blackouts, greater cost savings, and less dependence on fossil fuels.
What are we creating in this application?
In this application, we will show how to open and run a defined set of microgrid configurations with several specific control strategies equipped by a dynamic optimization. It consists of Modelica models, Jupyter notebooks and web-application.
This application requires Modelon Impact 2022.1 desktop installation.
You will learn how to:
- Install all application parts
- Run optimization models
- Run Jupyter notebooks
- Run web-app
It is necessary to download and install all the Microgrid components to a desktop computer from Modelon Thermal Power library.
- Add Optimize Microgrid custom function by copying
.py files need to be on the top level. If the
.py files are in a folder (impact/custom_function/custom_functions) then Modelon Impact won’t find them.
For web-application, please contact us directly on email@example.com.
Microgrid optimization notebook can be found in
C:/ModelonImpact_X.X/modelica-dist/ThermalPower X.XX/Resources/Python/Microgridto e.g.
- Run Jupyter Notebooks (e.g. run
Check that the
*.bat file includes correct Modelon Impact installation path (e.g.
This opens a browser with Jupyter notebook.
Microgrid-Optimization.ipynbwhich starts the notebook landing page.
Microgrid library includes several example models placed within
ThermalPower.MicroGrid.Examples. The whole package includes a detailed documentation and description explaining
the background, purpose and results of the specific examples.
Click here to find out, how to access the library documentation.
The optimization models can be run using below approach:
C:\ModelonImpact-1.2b2\modelica-dist\ThermalPower 1.22\Resources\custom_functions\Microgridfolder content into
C:/Users/<user_name>/impact/custom_functionsto make the Optimize Microgrid avaliable in Modelon Impact.
Restart the Modelon Impact server.
Create a new workspace "Microgrid".
Duplicate ThermalPower.MicroGrid.Examples.Optimization.EconomicDispatch model into your workspace.
Go to Experimentation mode and select custom function Optimize Microgrid.
Paste ThermalPower.MicroGrid.Examples.Simulation.EconomicDispatch as the "sim_model" within the custom function settings.
Run the simulation.
The Microgrid landing page offers a basic description and links to specific notebooks. Click on the links to access the desired notebook.
Each notebook is divided into different chapters:
- System overview
- Problem formulation
- Parameterization & General setup
- Optimization with post-processing
Do not forget to set up a correct path to the Microgrid notebook at the beggining of the notebook:
microgrid_package_path = "c:\ModelonImpact-X.XX\modelica-dist\ThermalPower X.XX"
my_libs=[microgrid_package_path, "c:\ModelonImpact-X.XX\modelica-dist\Modelon X.XX"]
The Microgrid web-app is self-explanatory.
The user selects a position on a map, where the microgrid should be placed and select a battery capacity with or without a diesel generator.
A user can run the basic simulation or choose from predefined optimization options.