Skip to content

Commit cfd85f5

Browse files
committed
update README
1 parent 01ed05c commit cfd85f5

File tree

1 file changed

+47
-11
lines changed

1 file changed

+47
-11
lines changed

README.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
# Uncertainty in model predictive control
1+
# Learning-based Model Predictive Control for Microgrid Energy Management
22

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)
410
- [Abstract](#abstract)
5-
- [Introduction](#introduction)
611
- [Running the code](#running-the-code)
712
- [Requirements](#requirements)
813
- [Running the experiment](#running-the-experiment)
@@ -12,13 +17,27 @@
1217
- [License](#license)
1318

1419
## 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.
1727

1828
## 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.
1932

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+
```
2038
### 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.
2241

2342
```bash
2443
python3 -m venv venv
@@ -27,17 +46,34 @@ pip install -r requirements.txt
2746
```
2847

2948
### Running the experiment
30-
To run the experiment, run the following command:
31-
49+
To run the experiments with default parameters, run the following command:
3250
```bash
3351
python3 main.py
3452
```
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+
```
3557

36-
## Citation
58+
### Hyperparameters optimisation
59+
The syne-tune library is used for hyperparameters optimisation.
60+
To run the optimisation, run the following command:
61+
```bash
62+
python3 tune.py --config_file ./configurations/sample.py
63+
```
64+
where the hyperparameters to optimise are specified in the [configurations/sample.py](configurations/sample.py) file.
3765

66+
## Citation
3867
If you use this code, please cite the following paper:
39-
40-
```bibtex
68+
```
69+
@inproceedings{casagrande2023online,
70+
title={An Online Learning Method for Microgrid Energy Management Control},
71+
author={Casagrande, Vittorio and Ferianc, Martin and Rodrigues, Miguel and Boem, Francesca},
72+
booktitle={2023 Mediterranean Conference on Control and Automation (MED)},
73+
pages={***--***},
74+
year={2023},
75+
organization={IEEE}
76+
}
4177
```
4278

4379
## Authors

0 commit comments

Comments
 (0)