Submitted:
16 May 2024
Posted:
17 May 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
1.1. Renewable Energy Directives
- Consists of at least 50 natural persons
- At least 75% of the shares are held by natural persons who are located within one postal area and a radius of 50 kilometers
- No member possess more than 10% of the shares
1.2. Renewable Energy Management Systems
1.3. Use Case
1.4. Contributions
2. Data
2.1. Synthesis And Analysis Of Synthetic Electrical Load Time Series At District Scale
2.2. Generate Dynamic Portfolios Of Renewable Energy Communities
- No unique DECTS have to be used twice.
- Each RECTS is composed of different DECTS in varying quantities , depicting a time dependent residents composition vector (Eq. (1)) for each REC.
- Since and only 300 DECTS exist for each ACORN subgroup, the quantity of RECTS is confined to 70.
- Each REC is assigned both a random start and a random end with random various probabilities that is set to zero.
- The residents composition of REC is linearly developed using start and end .
- Every new day, one of ten ACORN subgroups is randomly chosen and either a new DECTS is added or an existing one is excluded, unless the linear development curve from start to end is undershot or exceeded by more than 1.
| Algorithm 1:Generation of non-stationary and discontinous RECTS |
![]() |
2.3. Analyze Time Series Of Renewable Energy Communities
2.4. Transformation
3. Methodology
3.1. Problem Description
3.2. Concept
- All RECs are composed of the same distinct DECTS, as described in Section 2.2.
- All RECs are aware of the history of their .
- For effective model training using FL, all RECs must share the minimum and maximum values of their RECTS to achieve consistent data scaling over all clients.
3.3. Time Series Process
- monday → last friday ()
- tuesday → yesterday ()
- wednesday → yesterday ()
- thursday → yesterday ()
- friday → yesterday ()
- saturday → last saturday ()
- sunday → last sunday ()
- holiday → last sunday ()
- bridge day → last saturday ()
| p | Number of past observations to be considered in AR |
| , , | Regression parameters within an ARIX model |
| n | Number of variables used in regression equation (Table 4) |
| x | variable |
3.4. Time Series Forecast Model
3.5. Federated Learning
| Algorithm 2:FederatedAveraging |
![]() |
3.6. Experiments
4. Results
4.1. Experiment I.
4.2. Experiment II.
4.3. Experiment III
4.4. Experiment IV.
4.5. Experiment V.
5. Discussion
6. Conclusion
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A. Dickey Fuller Test For All RECTS
, (ii)
, (ii) medium non-stationary, (iv)
, (ii)
, (ii) medium non-stationary, (iv)
| RECTS | Critical Value | Pvalue | 1% | 5% | 10% |
|---|---|---|---|---|---|
| 0 | -2.61 | 0.09 | -3.44 | -2.87 | -2.57 |
| 1 | -1.83 | 0.37 | -3.44 | -2.87 | -2.57 |
| 2 | -2.13 | 0.23 | -3.44 | -2.87 | -2.57 |
| 3 | -1.93 | 0.32 | -3.44 | -2.87 | -2.57 |
| 4 | -2.63 | 0.09 | -3.44 | -2.87 | -2.57 |
| 5 | -2.75 | 0.07 | -3.44 | -2.87 | -2.57 |
| 6 | -2.15 | 0.22 | -3.44 | -2.87 | -2.57 |
| 7 | -4.01 | 0.0 | -3.44 | -2.87 | -2.57 |
| 8 | -3.58 | 0.01 | -3.44 | -2.87 | -2.57 |
| 9 | -2.71 | 0.07 | -3.44 | -2.87 | -2.57 |
| 10 | -3.16 | 0.02 | -3.44 | -2.87 | -2.57 |
| 11 | -3.83 | 0.0 | -3.44 | -2.87 | -2.57 |
| 12 | -3.46 | 0.01 | -3.44 | -2.87 | -2.57 |
| 13 | -2.18 | 0.21 | -3.44 | -2.87 | -2.57 |
| 14 | -1.92 | 0.32 | -3.44 | -2.87 | -2.57 |
| 15 | -2.51 | 0.11 | -3.44 | -2.87 | -2.57 |
| 16 | -2.43 | 0.13 | -3.44 | -2.87 | -2.57 |
| 17 | -2.39 | 0.14 | -3.44 | -2.87 | -2.57 |
| 18 | -2.96 | 0.04 | -3.44 | -2.87 | -2.57 |
| 19 | -2.78 | 0.06 | -3.44 | -2.87 | -2.57 |
| 20 | -2.32 | 0.17 | -3.44 | -2.87 | -2.57 |
| 21 | -2.11 | 0.24 | -3.44 | -2.87 | -2.57 |
| 22 | -2.75 | 0.07 | -3.44 | -2.87 | -2.57 |
| 23 | -2.94 | 0.04 | -3.44 | -2.87 | -2.57 |
| 24 | -2.19 | 0.21 | -3.44 | -2.87 | -2.57 |
| 25 | -2.08 | 0.25 | -3.44 | -2.87 | -2.57 |
| 26 | -2.96 | 0.04 | -3.44 | -2.87 | -2.57 |
| 27 | -1.91 | 0.33 | -3.44 | -2.87 | -2.57 |
| 28 | -2.19 | 0.21 | -3.44 | -2.87 | -2.57 |
| 29 | -2.04 | 0.27 | -3.44 | -2.87 | -2.57 |
| 30 | -1.87 | 0.34 | -3.44 | -2.87 | -2.57 |
| 31 | -2.11 | 0.24 | -3.44 | -2.87 | -2.57 |
| 32 | -3.01 | 0.03 | -3.44 | -2.87 | -2.57 |
| 33 | -2.48 | 0.12 | -3.44 | -2.87 | -2.57 |
| 34 | -1.79 | 0.38 | -3.44 | -2.87 | -2.57 |
| 35 | -2.09 | 0.25 | -3.44 | -2.87 | -2.57 |
| 36 | -1.61 | 0.48 | -3.44 | -2.87 | -2.57 |
| 37 | -1.77 | 0.39 | -3.44 | -2.87 | -2.57 |
| 38 | -1.77 | 0.4 | -3.44 | -2.87 | -2.57 |
| 39 | -2.15 | 0.23 | -3.44 | -2.87 | -2.57 |
| 40 | -1.47 | 0.55 | -3.44 | -2.87 | -2.57 |
| 41 | -2.11 | 0.24 | -3.44 | -2.87 | -2.57 |
| 42 | -1.43 | 0.57 | -3.44 | -2.87 | -2.57 |
| 43 | -1.87 | 0.34 | -3.44 | -2.87 | -2.57 |
| 44 | -1.91 | 0.33 | -3.44 | -2.87 | -2.57 |
| 45 | -2.01 | 0.28 | -3.44 | -2.87 | -2.57 |
| 46 | -2.32 | 0.16 | -3.44 | -2.87 | -2.57 |
| 47 | -1.77 | 0.4 | -3.44 | -2.87 | -2.57 |
| 48 | -1.69 | 0.43 | -3.44 | -2.87 | -2.57 |
| 49 | -2.42 | 0.14 | -3.44 | -2.87 | -2.57 |
| 50 | -2.02 | 0.28 | -3.44 | -2.87 | -2.57 |
| 51 | -2.7 | 0.07 | -3.44 | -2.87 | -2.57 |
| 52 | -2.65 | 0.08 | -3.44 | -2.87 | -2.57 |
| 53 | -2.41 | 0.14 | -3.44 | -2.87 | -2.57 |
| 54 | -1.92 | 0.32 | -3.44 | -2.87 | -2.57 |
| 55 | -1.63 | 0.47 | -3.44 | -2.87 | -2.57 |
| 56 | -1.88 | 0.34 | -3.44 | -2.87 | -2.57 |
| 57 | -2.35 | 0.16 | -3.44 | -2.87 | -2.57 |
| 58 | -2.17 | 0.22 | -3.44 | -2.87 | -2.57 |
| 59 | -1.88 | 0.34 | -3.44 | -2.87 | -2.57 |
| 60 | -0.85 | 0.81 | -3.44 | -2.87 | -2.57 |
| 61 | -1.61 | 0.48 | -3.44 | -2.87 | -2.57 |
| 62 | -2.08 | 0.25 | -3.44 | -2.87 | -2.57 |
| 63 | -1.87 | 0.35 | -3.44 | -2.87 | -2.57 |
| 64 | -1.22 | 0.66 | -3.44 | -2.87 | -2.57 |
| 65 | -2.13 | 0.23 | -3.44 | -2.87 | -2.57 |
| 66 | -2.14 | 0.23 | -3.44 | -2.87 | -2.57 |
| 67 | -2.2 | 0.2 | -3.44 | -2.87 | -2.57 |
| 68 | -2.88 | 0.05 | -3.44 | -2.87 | -2.57 |
| 69 | -3.49 | 0.01 | -3.44 | -2.87 | -2.57 |
Appendix B. Example Time Series Of Renewable Energy Communities

Appendix C. Average Member Number Of Renewable Energy Communities

Appendix D. Error Metrics
Appendix E. Abbreviations
| ADF | Augmented Dickey-Fuller test |
| AR | AutoRegressive |
| ARIX | AutoRegressive Integrated with eXogenous variables |
| bs | Batch size |
| CL Model | Centrally learned forecast model |
| DECTS | District electricity consumption time series |
| DEMS | District energy management systems |
| F | Future part within ARIMA |
| FL | Federated learning |
| FL Model | Federated learned forecast model |
| FNN | Feedforward neural network |
| I | Integrated part within ARIMA |
| IQR | Interqurtile range |
| lr | Learning rate |
| MAE | Mean absolute error |
| MAPE | Mean absolute percentage error |
| ML | Machine learning |
| non-iid | Non-identical and independently distributed |
| Q1 | First quartile |
| Q2 | Second quartile |
| Q3 | Third quartile |
| REC | Renewable Energy Communities |
| RECTS | REC time series |
| REC-ECF | REC energy consumption forecasting algorithms |
| REC-EMS | REC energy management systems |
| RED II | Renewable Energy Directive |
| Single Model | Single time series forecast model |
| sts | Shared time series to each client |
References
- https://www.ipcc.ch/sr15/chapter/chapter-1/. visited on 2024-02-07.
- https://www.europarl.europa.eu/factsheets/de/sheet/45/energiebinnenmarkt. visited on 2023-01-05.
- https://eur-lex.europa.eu/legal-content/DE/TXT/PDF/?uri=CELEX:02018L2001-20181221&from=EN. visited on 2023-01-05.
- https://www.bmwk.de/Redaktion/DE/Publikationen/Energie/7-energieforschungsprogramm-der-bundesregierung.pdf?__blob=publicationFile&v=4. visited on 2023-01-05.
- Sauerbrey, J.; Bender, T.; Flemming, S.; Martin, A.; Naumann, S.; Warweg, O. Towards intelligent energy management in energy communities: Introducing the district energy manager and an IT reference architecture for district energy management systems. Energy Reports 2024, 11, 2255–2265. [Google Scholar] [CrossRef]
- Abrahamse, W.; Steg, L. Factors Related to Household Energy Use and Intention to Reduce It: The Role of Psychological and Socio-Demographic Variables. Human Ecology Review 2011, 18, 30–40. [Google Scholar]
- Flemming, S.; Bender, T.; Surmann, A.; Pelka, S.; Martin, A.; Kuehnbach, M. Vor-Ort-Systeme als flexibler Baustein im Energiesystem ? Eine cross-sektorale Potenzialanalyse 2023. [CrossRef]
- Beucker, S.; Bergesen, J.; Gibon, T. Building Energy Management Systems: Global Potentials and Environmental Implications of Deployment. Journal of Industrial Ecology 2015, 20, n/a–n/a. [Google Scholar] [CrossRef]
- https://wirtschaftslexikon.gabler.de/definition/energiemanagementsystem-53996. visited on 2023-01-06.
- Richter, L.; Lehna, M.; Marchand, S.; Scholz, C.; Dreher, A.; Klaiber, S.; Lenk, S. Artificial Intelligence for Electricity Supply Chain automation. Renewable and Sustainable Energy Reviews 2022, 163, 112459. [Google Scholar] [CrossRef]
- https://www.gesetze-im-internet.de/enwg_2005/__41a.html. visited on 2024-02-07.
- Klaiber, S. Analyse, Identifikation und Prognose preisbeeinflusster elektrischer Lastzeitreihen. PhD thesis, Technische Universität Ilmenau, 2020.
- https://eur-lex.europa.eu/legal-content/en/TXT/?uri=CELEX:32019L0944. visited on 2024-02-07.
- Hyndman, R.; Athanasopoulos, G. Forecasting: Principles and Practice, 2nd ed.; OTexts: Australia, 2018. [Google Scholar]
- Richter, L.; Bender, T.; Lenk, S.; Bretschneider, P. Generating Synthetic Electricity Load Time Series at District Scale Using Probabilistic Forecasts. Energies 2024, 17. [Google Scholar] [CrossRef]
- Han, Z.; Zhao, J.; Leung, H.; Ma, K.F.; Wang, W. A Review of Deep Learning Models for Time Series Prediction. IEEE Sensors Journal 2021, 21, 7833–7848. [Google Scholar] [CrossRef]
- Runge, J.; Zmeureanu, R. A Review of Deep Learning Techniques for Forecasting Energy Use in Buildings. Energies 2021, 14, 608. [Google Scholar] [CrossRef]
- Bot, K.; Ruano, A.; Ruano, M. , Forecasting Electricity Consumption in Residential Buildings for Home Energy Management Systems; 2020; pp. 313–326. [CrossRef]
- Wang, W.; Hussain, F.; Lian, Z.; Yin, Z.; Gadekallu, T.; Pham, Q.V.; Dev, K.; Su, C. Secure-Enhanced Federated Learning for AI-Empowered Electric Vehicle Energy Prediction. IEEE Consumer Electronics Magazine 2021. [Google Scholar] [CrossRef]
- Lu, Y.; Tian, Z.; Zhou, R.; Liu, W. A general transfer learning-based framework for thermal load prediction in regional energy system. Energy 2021, 217, 119322. [Google Scholar] [CrossRef]
- Suryanarayana, G.; Lago, J.; Geysen, D.; Aleksiejuk, P.; Johansson, C. Thermal load forecasting in district heating networks using deep learning and advanced feature selection methods. Energy 2018, 157. [Google Scholar] [CrossRef]
- Shirzadi, N.; Nizami, A.; Khazen, M.; Nik Bakht, M. Medium-Term Regional Electricity Load Forecasting through Machine Learning and Deep Learning. Designs 2021, 5, 27. [Google Scholar] [CrossRef]
- Liu, H.; Zhang, X.; Shen, X.; Sun, H. A Federated Learning Framework for Smart Grids: Securing Power Traces in Collaborative Learning, 2021. [CrossRef]
- Taïk, A.; Cherkaoui, S. Electrical Load Forecasting Using Edge Computing and Federated Learning. ICC 2020 - 2020 IEEE International Conference on Communications (ICC), 2020, pp. 1–6. [CrossRef]
- Gholizadeh, N.; Musilek, P. Federated learning with hyperparameter-based clustering for electrical load forecasting. Internet of Things 2021, 17, 100470. [Google Scholar] [CrossRef]
- https://www.caci.co.uk/wp-content/uploads/2021/06/Acorn-User-Guide-2020.pdf. visited on 2024-05-16.
- Gardner, W.A.; Napolitano, A.; Paura, L. Cyclostationarity: Half a century of research. Signal Processing 2006, 86, 639–697. [Google Scholar] [CrossRef]
- Aminikhanghahi, S.; Cook, D. A Survey of Methods for Time Series Change Point Detection. Knowledge and Information Systems 2017, 51. [Google Scholar] [CrossRef]
- Schwertman, N.C.; Owens, M.A.; Adnan, R. A simple more general boxplot method for identifying outliers. Computational Statistics And Data Analysis 2004, 47, 165–174. [Google Scholar] [CrossRef]
- Pinheiro, M.; Madeira, S.; Francisco, A. Short-term electricity load forecasting - A systematic approach from system level to secondary substations. Applied Energy 2023, 332, 120493. [Google Scholar] [CrossRef]
- Gasparin, A.; Lukovic, S.; Alippi, C. Deep Learning for Time Series Forecasting: The Electric Load Case, 2019; arXiv:cs.LG/1907.09207].
- Tunnicliffe Wilson, G. Time Series Analysis: Forecasting and Control,5th Edition, by George E. P. Box, Gwilym M. Jenkins, Gregory C. Reinsel and Greta M. Ljung, 2015. Published by John Wiley and Sons Inc., Hoboken, New Jersey, pp. 712. ISBN: 978-1-118-67502-1. Journal of Time Series Analysis 2016, 37, n/a–n/a. [Google Scholar] [CrossRef]
- Shi, Y.; Ying, X.; Yang, J. Deep Unsupervised Domain Adaptation with Time Series Sensor Data: A Survey. Sensors 2022, 22. [Google Scholar] [CrossRef]
- Purushotham, S.; Carvalho, W.; Nilanon, T.; Liu, Y. Variational Recurrent Adversarial Deep Domain Adaptation. 2019.
- Arik, S.O.; Yoder, N.C.; Pfister, T. Self-Adaptive Forecasting for Improved Deep Learning on Non-Stationary Time-Series, 2022; arXiv:cs.LG/2202.02403].
- https://transparency.entsoe.eu. visited on 2023-11-28.
- McMahan, H.B.; Moore, E.; Ramage, D.; Hampson, S.; y Arcas, B.A. Communication-Efficient Learning of Deep Networks from Decentralized Data, 2023; arXiv:cs.LG/1602.05629].
- Shi, Y.; Xu, X. Deep Federated Adaptation: An Adaptative Residential Load Forecasting Approach with Federated Learning. Sensors 2022, 22, 3264. [Google Scholar] [CrossRef]
- Wang, Y.; Gao, N.; Hug, G. Personalized Federated Learning for Individual Consumer Load Forecasting. CSEE Journal of Power and Energy Systems 2023, 9, 326–330. [Google Scholar] [CrossRef]
- Chen, J.; Gao, T.; Si, R.; Dai, Y.; Jiang, Y.; Zhang, J. Residential Short Term Load Forecasting Based on Federated Learning. 2022 IEEE 2nd International Conference on Digital Twins and Parallel Intelligence (DTPI), 2022, pp. 1–6. [CrossRef]
- Savi, M.; Olivadese, F. Short-Term Energy Consumption Forecasting at the Edge: A Federated Learning Approach. IEEE Access 2021, 9, 1–21. [Google Scholar] [CrossRef]
- Zhu, H.; Xu, J.; Liu, S.; Jin, Y. Federated Learning on Non-IID Data: A Survey, 2021; arXiv:cs.LG/2106.06843].
- Zhao, Y.; Li, M.; Lai, L.; Suda, N.; Civin, D.; Chandra, V. Federated Learning with Non-IID Data 2018. [CrossRef]
- Keskar, N.S.; Mudigere, D.; Nocedal, J.; Smelyanskiy, M.; Tang, P.T.P. On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima, 2017; arXiv:cs.LG/1609.04836].
- https://www.tensorflow.org. visited on 2024-03-13.
- Schlittgen, R.; Streitberg, B.H. Zeitreihenanalyse; Oldenbourg Wissenschaftsverlag, 2001. [CrossRef]
- Li, T.; Sahu, A.K.; Zaheer, M.; Sanjabi, M.; Talwalkar, A.; Smith, V. Federated Optimization in Heterogeneous Networks, 2020; arXiv:cs.LG/1812.06127].
- Acar, D.A.E.; Zhao, Y.; Navarro, R.M.; Mattina, M.; Whatmough, P.N.; Saligrama, V. Federated Learning Based on Dynamic Regularization, 2021; arXiv:cs.LG/2111.04263].
- Li, X.; Huang, K.; Yang, W.; Wang, S.; Zhang, Z. On the Convergence of FedAvg on Non-IID Data, 2020; arXiv:stat.ML/1907.02189].
- Charles, Z.; Garrett, Z.; Huo, Z.; Shmulyian, S.; Smith, V. On Large-Cohort Training for Federated Learning, 2021; arXiv:cs.LG/2106.07820].



















| Unfiltered 55 ACORN subgroups | 0.88 | 0.08 |
| Filtered 10 ACORN subgroups | 0.82 | 0.12 |
| critical value | pvalue | |||
|---|---|---|---|---|
| -1.58 | 0.49 | -3.44 | -2.87 | -2.57 |
| data type | variable | description | considered in |
|---|---|---|---|
| target | RECTS | provide target states | AR, I |
| calendar | day of year (doy) | models annual seasonality | AR, I, F |
| calendar | day of week (dow) | models short-term periodicity | AR, I, F |
| calendar | daytime (dt) | models intraday periodicity | AR, I, F |
| weather | temperature (T) | models T dependencies | AR, I, F |
| weather | relative humidity (RH) | models RH dependencies | AR, I, F |
| residents composition | models dependencies on RECTS stochasticity |
AR, I, F |
| Forecast Model | Batch Size | Shared Time Series | Learning Rate |
|---|---|---|---|
| M1 | 16 | 0 | 0.0001 |
| M1 | 64 | 0 | 0.0001 |
| M2 | 16 | 2 | 0.0001 |
| M3 | 64 | 2 | 0.0001 |
| M4 | 16 | 0 | 0.001 |
| M5 | 64 | 0 | 0.001 |
| M6 | 16 | 2 | 0.001 |
| M7 | 64 | 2 | 0.001 |
| No. | Objective | Setting |
|---|---|---|
| I. | Train FNN for all RECs regarding using federated learning (multi RECTS). In this study, we use REC with a small member size to illustrate the model’s transferability to out-of-sample data. |
15em
|
| II. | Train FNN for each REC neglecting (single RECTS) and compare them |
15em
|
| III. | Train FNN for each REC providing (single RECTS) and compare them |
15em
|
| IV. | Train a FNN for all RECs neglecting (multi RECTS) and compare them |
15em
|
| V. | Train a FNN for all RECs providing (multi RECTS) and compare them |
15em
|
| M0 | M1 | M2 | M3 | M4 | M5 | M6 | M7 | |
|---|---|---|---|---|---|---|---|---|
| MAE [kW] | 5.57 | 7.30 | 4.10 | 5.89 | 2.68 | 3.85 | 2.65 | 3.18 |
| MAPE [%] | 17.18 | 22.70 | 12.40 | 18.23 | 8.10 | 12.04 | 8.03 | 9.77 |
| MAE- | MAE- | |
|---|---|---|
| FL Model | 2.65 | 0.5 |
| Single Model | 4.72 | 0.5 |
| MAE- | MAE- | |
|---|---|---|
| FL Model | 2.65 | 0.5 |
| Single Model | 5.81 | 1.22 |
| MAE- | MAE- | |
|---|---|---|
| FL Model | 2.65 | 0.5 |
| CL Model | 3.23 | 0.48 |
| MAE- | MAE- | |
|---|---|---|
| FL Model | 2.65 | 0.5 |
| CL Model | 2.86 | 0.43 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

