This repository contains the work for Assignment 1 of the Machine Learning for Energy Systems course, focusing on renewable energy trading in day-ahead and balancing electricity markets. The project combines machine learning, regression models, and optimization techniques to forecast wind power production and optimize trading strategies.
Date: September-October 2024
The assignment simulates the role of a wind farm owner aiming to trade energy in the electricity market. It processes historical wind and climate data from Bornholm, Denmark, along with day-ahead and balancing market prices, to develop predictive models and optimize trading strategies.
Two main modeling approaches were implemented:
-
Model 1 β Indirect Regression for Trading
- Predict wind power production using linear and non-linear regression with L1 (Lasso) and L2 (Ridge) regularization.
- Evaluate models based on prediction accuracy and expected revenue.
- Explore data clustering (k-means) to improve prediction.
-
Model 2 β Direct Regression for Trading
- Use regression or classification models to directly predict the optimal offering strategy for each trading period.
- Compare performance with Model 1.
- Data preprocessing and feature engineering
- Linear and non-linear regression
- Regularization (L1/Lasso and L2/Ridge)
- Optimization for energy trading (linear programming)
- Unsupervised learning (k-means clustering)
- Model evaluation (RMSE, MAE, RΒ², revenue metrics)
- Python programming
βββ data/ # Raw and processed datasets
β βββ features-targets.csv # Model 1 dataset
β βββ model2_dataset.csv # Model 2 dataset
βββ scripts/ # Python scripts for analysis, models, and optimization
β βββ data_collection/ # Functions for dataset generation
β β βββ data_generator.py
β β βββ model2datageneration.py
β βββ linear_regression/
β β βββ linear_regression.py
β βββ nonlinear_regression/
β β βββ nonlinear_regression.py
β β βββ nonlinear_regression_metrics.py
β β βββ weighted_regression.py
β βββ optimization/
β β βββ bid_optimization.py
β β βββ revenue_calc.py
β βββ regularization/
β βββ regularization.py
βββ main.py # Script to run all relevant programs
βββ report.pdf # Assignment report
- Non-linear regression with L2 (Ridge) regularization achieved the highest prediction accuracy for wind power.
- Model 1 (predictive regression approach) generated the highest expected revenue in day-ahead and balancing markets.
- Weighted regression and feature expansion improved accuracy, particularly during periods of high variability.
- Explore ensemble methods or deep learning models to improve prediction accuracy.
- Extend analysis to multiple wind farms for portfolio-level trading optimization.
- Implement real-time prediction and trading workflow for dynamic market conditions.
- Incorporate additional features such as weather forecasts or intraday market signals.
This project was developed in collaboration with:
- @nic0lew0ng
- @ZilentKnight (Albert R. H.)
- @s233239 (zoewr)
- @MVKA-hub
- Machine Learning for Energy Systems course materials.
- Historical wind data from Bornholm wind farms (DK2 market area).
- Day-ahead and balancing market data from Danish DK2 market area.