You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-11Lines changed: 47 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,13 @@
1
-
# Uncertainty in model predictive control
1
+
# Learning-based Model Predictive Control for Microgrid Energy Management
2
2
3
-
-[Uncertainty in model predictive control](#uncertainty-in-model-predictive-control)
3
+
by Vittorio Casagrande ([email protected]), Martin Ferianc, Miguel Rodrigues and Francesca Boem
4
+
5
+
This repository contains the code used for the paper "An Online Learning Method for Microgrid Energy Management Control" presented at the 31st Mediterranean Conference on Control and Automation (MED 2023) in Limassol, Cyprus.
6
+
In the code we implement an innovative method for online training of a neural network used for prediction of unknown profiles (for example load demand and electricity prices) to be used for microgrid energy management.
7
+
The code is implemented in Pytorch leveraging the [Pytorch Lightning](https://www.pytorchlightning.ai/) framework for neural network training and [cvxpylayers](https://github.com/cvxgrp/cvxpylayers) for constructing the convex optimisation layer.
8
+
9
+
-[Learning-based Model Predictive Control for Microgrid Energy Management](#learning-based-model-predictive-control-for-microgrid-energy-management)
4
10
-[Abstract](#abstract)
5
-
-[Introduction](#introduction)
6
11
-[Running the code](#running-the-code)
7
12
-[Requirements](#requirements)
8
13
-[Running the experiment](#running-the-experiment)
@@ -12,13 +17,27 @@
12
17
-[License](#license)
13
18
14
19
## Abstract
15
-
16
-
## Introduction
20
+
A novel Model Predictive Control (MPC) scheme based on online-learning (OL) for microgrid
21
+
energy management, is proposed.
22
+
The MPC method deals with uncertainty on the load demand, renewable generation and electricity prices, by employing the predictions provided by an online trained neural network in the optimisation problem.
23
+
In order to adapt to possible changes in the environment, the neural network is online trained based on continuously received data.
24
+
The network hyperparameters can be selected by performing a hyperparameter optimisation before the deployment of the controller, using a pretraining dataset.
25
+
We show the effectiveness of the proposed method for microgrid energy management through extensive experiments on real microgrid datasets.
26
+
Moreover, we show that the proposed algorithm has good transfer learning (TL) capabilities among different microgrids.
17
27
18
28
## Running the code
29
+
Several experiments can be run using the code in this repository.
30
+
The power and price profiles for three different industrial sites are provided in the [data](data) folder.
31
+
A standard LSTM neural network is used for prediction of the unknown profiles, all the network and optimisation parameters can be passed as command line arguments.
19
32
33
+
### Getting the code
34
+
A copy of all the files can be obtained by cloning the repository:
35
+
```bash
36
+
git clone https://github.com/vittpi/ol-ems.git
37
+
```
20
38
### Requirements
21
-
In order to run the code, create a virtual environment with the following packages:
39
+
A working Python environment is required to run the code.
40
+
To do this create a virtual environment and install the required packages.
To run the experiments with default parameters, run the following command:
32
50
```bash
33
51
python3 main.py
34
52
```
53
+
Additional command line arguments can be passed to the script to change the default parameters. For example, to change the number of hidden units of the neural network to 24, run the following command:
54
+
```bash
55
+
python3 main.py --hidden_dim 24
56
+
```
35
57
36
-
## Citation
58
+
### Hyperparameters optimisation
59
+
The syne-tune library is used for hyperparameters optimisation.
60
+
To run the optimisation, run the following command:
0 commit comments