# Data-Driven Energy Storage Scheduling to Minimise Peak Demand on Distribution Systems with PV Generation

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Problem Formulation and Methods

#### 2.1. Data Description

^{2}) which is also an average value over the next half-hour period and the instantaneous temperature (in °C) measured at the surface of the PV module. Finally, for the weather, reanalysis data are used, which are a combination of observations with past short-range weather forecasts that are afterwards reprocessed using modern forecasting techniques to achieve a consistent estimation of weather variables. These data include averaged hourly irradiance (W/m

^{2}) and instantaneous surface temperature (°C) for six locations (numbered 1 through 6) corresponding to grid points on the numerical weather prediction grid for dates between January 2015 and July 2020. Given the influence of weather variables in both demand and PV power forecasting, it was necessary to linearly interpolate the weather reanalysis data to 30 min frequency and merge then with the remaining datasets. The weather data are used as a kind of weather forecasting, or, in other words, they are assumed to be known for the target week.

#### 2.2. Data Cleaning

#### 2.3. Model Selection and Validation Strategy

#### 2.4. Photovoltaic (PV) Power Prediction

#### 2.5. Models

#### 2.5.1. Random Forest

#### 2.5.2. LSTM and CNN-LSTM

#### Model Comparison

#### 2.6. Demand Prediction

#### 2.6.1. Feature Engineering and Selection

**Time series analysis:**Rolling statistics (both exponential and regular moving average and standard deviation of the demand for the previous week), lagged effects (demand value at the same hour for the past week) and trends at different scales (first order differences of temperature and solar irradiance and their averages over periods of 2, 12 and 24 h).**Time-related:**Hour of the day, day of the week, day of the month, month, year. Cyclic versions of hour of the day, day of the month and month consist of encoding these features as points in a 2D circle (see [32]).**Task-specific:**Bank holidays are labelled as Sunday and all features mentioned in the time-series analysis were shifted accordingly so that they coincided with the previous Sunday. Specific flags were added to distinguish the lockdown from regular days and to mark large sports events, such as England matches in the FIFA World Cup 2018.

#### 2.6.2. Models

#### 2.6.3. CatBoost

#### 2.6.4. Artificial Neural Network

#### 2.6.5. TabNet

#### 2.7. Model Comparison

#### 2.8. Optimisation

#### 2.9. Battery Charge Smoothing

## 3. Results

## 4. Discussion

## 5. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Appendix A. Modelling of the Optimisation Problem

#### Appendix A.1. Constraints

#### Appendix A.2. Objective Function

#### Appendix A.3. Optimisation Model

## References

- Energy Trends: UK Renewables. Available online: https://www.gov.uk/government/statistics/energy-trends-section-6-renewables (accessed on 5 May 2021).
- Locatelli, G.; Palerma, E.; Mancini, M. Assessing the economics of large Energy Storage Plants with an optimisation methodology. Energy
**2015**, 83, 15–28. [Google Scholar] [CrossRef] [Green Version] - Infield, D.; Freir, L. Renewable Energy in Power Systems; Wiley: Hoboken, NJ, USA, 2020. [Google Scholar]
- Beltran, H.; Perez, E.; Aparicio, N.; Rodriguez, P. Daily Solar Energy Estimation for Minimizing Energy Storage Requirements in PV Power Plants. IEEE Trans. Sustain. Energy
**2013**, 4, 474–481. [Google Scholar] [CrossRef] [Green Version] - Mexis, I.; Todeschini, G. Battery Energy Storage Systems in the United Kingdom: A Review of Current State-of-the-Art and Future Applications. Energies
**2020**, 13, 3616. [Google Scholar] [CrossRef] - Din, G.M.U.; Marnerides, A.K. Short term power load forecasting using Deep Neural Networks. In Proceedings of the 2017 International Conference on Computing, Networking and Communications (ICNC), Silicon Valley, CA, USA, 26–29 January 2017; pp. 594–598. [Google Scholar] [CrossRef] [Green Version]
- Gross, G.; Galiana, F. Short-term load forecasting. Proc. IEEE
**1987**, 75, 1558–1573. [Google Scholar] [CrossRef] - Vu, D.H.; Muttaqi, K.M.; Agalgaonkar, A.P. Short-term load forecasting using regression based moving windows with adjustable window-sizes. In Proceedings of the 2014 IEEE Industry Application Society Annual Meeting, Vancouver, BC, Canada, 5–9 October 2014; pp. 1–8. [Google Scholar] [CrossRef] [Green Version]
- Sinden, G. Characteristics of the UK wind resource: Long-term patterns and relationship to electricity demand. Energy Policy
**2007**, 35, 112–127. [Google Scholar] [CrossRef] - Staffell, I.; Pfenninger, S. The increasing impact of weather on electricity supply and demand. Energy
**2018**, 145, 65–78. [Google Scholar] [CrossRef] - Hong, T. Short Term Electric Load Forecasting. Ph.D. Thesis, North Carolina State University, Raleigh, NC, USA, 2010. [Google Scholar]
- Hong, T.; Fan, S. Probabilistic electric load forecasting: A tutorial review. Int. J. Forecast.
**2016**, 32, 914–938. [Google Scholar] [CrossRef] - Wang, K.; Qi, X.; Liu, H. Photovoltaic power forecasting based LSTM-Convolutional Network. Energy
**2019**, 189, 116225. [Google Scholar] [CrossRef] - Sobri, S.; Koohi-Kamali, S.; Rahim, N.A. Solar photovoltaic generation forecasting methods: A review. Energy Convers. Manag.
**2018**, 156, 459–497. [Google Scholar] [CrossRef] - Qing, X.; Niu, Y. Hourly day-ahead solar irradiance prediction using weather forecasts by LSTM. Energy
**2018**, 148, 461–468. [Google Scholar] [CrossRef] - Shi, Y.; Xu, B.; Wang, D.; Zhang, B. Using Battery Storage for Peak Shaving and Frequency Regulation: Joint Optimization for Superlinear Gains. In Proceedings of the 2018 IEEE Power Energy Society General Meeting (PESGM), Portland, OR, USA, 5–9 August 2018; p. 1. [Google Scholar] [CrossRef] [Green Version]
- Silva, V.A.; Aoki, A.R.; Lambert-Torres, G. Optimal Day-Ahead Scheduling of Microgrids with Battery Energy Storage System. Energies
**2020**, 13, 5188. [Google Scholar] [CrossRef] - Sossan, F.; Namor, E.; Cherkaoui, R.; Paolone, M. Achieving the Dispatchability of Distribution Feeders Through Prosumers Data Driven Forecasting and Model Predictive Control of Electrochemical Storage. IEEE Trans. Sustain. Energy
**2016**, 7, 1762–1777. [Google Scholar] [CrossRef] [Green Version] - Wang, Z.; Negash, A.; Kirschen, D.S. Optimal scheduling of energy storage under forecast uncertainties. IET Gener. Transm. Distrib.
**2017**, 11, 4220–4226. [Google Scholar] [CrossRef] - Scarabaggio, P.; Grammatico, S.; Carli, R.; Dotoli, M. Distributed Demand Side Management With Stochastic Wind Power Forecasting. IEEE Trans. Control Syst. Technol.
**2021**, 1–16. [Google Scholar] [CrossRef] - Rigo-Mariani, R.; Chea Wae, S.O.; Mazzoni, S.; Romagnoli, A. Comparison of optimization frameworks for the design of a multi-energy microgrid. Appl. Energy
**2020**, 257, 113982. [Google Scholar] [CrossRef] - Melhem, F.Y.; Grunder, O.; Hammoudan, Z.; Moubayed, N. Energy Management in Electrical Smart Grid Environment Using Robust Optimization Algorithm. IEEE Trans. Ind. Appl.
**2018**, 54, 2714–2726. [Google Scholar] [CrossRef] - Hosseini, S.M.; Carli, R.; Dotoli, M. A Residential Demand-Side Management Strategy under Nonlinear Pricing Based on Robust Model Predictive Control. In Proceedings of the 2019 IEEE International Conference on Systems, Man and Cybernetics (SMC), Bari, Italy, 6–9 October 2019; pp. 3243–3248. [Google Scholar] [CrossRef]
- Presumed Open Data (POD). Available online: https://westernpower.co.uk/innovation/projects/presumed-open-data-pod (accessed on 1 May 2021).
- Western Power Distribution Open Data Hub Homepage. Available online: https://www.westernpower.co.uk/innovation/pod (accessed on 22 April 2021).
- Rajagukguk, R.A.; Ramadhan, R.A.A.; Lee, H.J. A Review on Deep Learning Models for Forecasting Time Series Data of Solar Irradiance and Photovoltaic Power. Energies
**2020**, 13, 6623. [Google Scholar] [CrossRef] - Caldas, M.; Alonso-Suárez, R. Very short-term solar irradiance forecast using all-sky imaging and real-time irradiance measurements. Renew. Energy
**2019**, 143, 1643–1658. [Google Scholar] [CrossRef] - Breiman, L. Random forests. Mach. Learn.
**2001**, 45, 5–32. [Google Scholar] [CrossRef] [Green Version] - Antonanzas, J.; Osorio, N.; Escobar, R.; Urraca, R.; de Pison, F.M.; Antonanzas-Torres, F. Review of photovoltaic power forecasting. Sol. Energy
**2016**, 136, 78–111. [Google Scholar] [CrossRef] - Snoek, J.; Larochelle, H.; Adams, R.P. Practical bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems; Curran Associates, Inc.: Red Hook, NY, USA, 2012; pp. 2951–2959. [Google Scholar]
- Hu, R.; Wen, S.; Zeng, Z.; Huang, T. A short-term power load forecasting model based on the generalized regression neural network with decreasing step fruit fly optimization algorithm. Neurocomputing
**2017**, 221, 24–31. [Google Scholar] [CrossRef] - Moon, J.; Park, S.; Rho, S.; Hwang, E. A comparative analysis of artificial neural network architectures for building energy consumption forecasting. Int. J. Distrib. Sens. Netw.
**2019**, 15. [Google Scholar] [CrossRef] [Green Version] - Park, D.; El-Sharkawi, M.; Marks, R.; Atlas, L.; Damborg, M. Electric load forecasting using an artificial neural network. IEEE Trans. Power Syst.
**1991**, 6, 442–449. [Google Scholar] [CrossRef] [Green Version] - Lloyd, J.R. GEFCom2012 hierarchical load forecasting: Gradient boosting machines and Gaussian processes. Int. J. Forecast.
**2014**, 30, 369–374. [Google Scholar] [CrossRef] [Green Version] - Singh, S.; Hussain, S.; Bazaz, M.A. Short term load forecasting using artificial neural network. In Proceedings of the 2017 Fourth International Conference on Image Information Processing (ICIIP), Shimla, India, 21–23 December 2017; pp. 1–5. [Google Scholar] [CrossRef]
- Hong, T.; Pinson, P.; Fan, S. Global Energy Forecasting Competition 2012. Int. J. Forecast.
**2014**, 30, 357–363. [Google Scholar] [CrossRef] - Arik, S.Ö.; Pfister, T. TabNet: Attentive Interpretable Tabular Learning. arXiv
**2019**, arXiv:1908.07442. [Google Scholar] - Lundberg, S.M.; Lee, S.I. A Unified Approach to Interpreting Model Predictions. In Advances in Neural Information Processing Systems 30; Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., Garnett, R., Eds.; Curran Associates, Inc.: Nice, France, 2017; pp. 4765–4774. [Google Scholar]
- Prokhorenkova, L.; Gusev, G.; Vorobev, A.; Dorogush, A.V.; Gulin, A. CatBoost: Unbiased boosting with categorical features. In Advances in Neural Information Processing Systems; Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., Garnett, R., Eds.; Curran Associates, Inc.: Nice, France, 2018; Volume 31. [Google Scholar]
- Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat.
**2001**, 29, 1189–1232. [Google Scholar] [CrossRef] - Gamrath, G.; Anderson, D.; Bestuzheva, K.; Chen, W.K.; Eifler, L.; Gasse, M.; Gemander, P.; Gleixner, A.; Gottwald, L.; Halbig, K.; et al. The SCIP Optimization Suite 7.0; Technical Report; Optimization Online; Zuse Institute Berlin: Berlin, Germany, 2020. [Google Scholar]
- Potra, F.A.; Wright, S.J. Interior-point methods. J. Comput. Appl. Math.
**2000**, 124, 281–302. [Google Scholar] [CrossRef] [Green Version] - Donti, P.L.; Kolter, J.Z.; Amos, B. Task-based End-to-end Model Learning in Stochastic Optimization. In Advances in Neural Information Processing Systems 30, Proceedings of the Annual Conference on Neural Information Processing Systems 2017, Long Beach, CA, USA, 4–9 December 2017; Guyon, I., von Luxburg, U., Bengio, S., Wallach, H.M., Fergus, R., Vishwanathan, S.V.N., Garnett, R., Eds.; Curran Associates, Inc.: Long Beach, CA, USA, 2017; pp. 5484–5494. [Google Scholar]
- Bisschop, J. AIMMS—Optimization Modeling; Lulu.com, 2006. Available online: https://documentation.aimms.com/_downloads/AIMMS_modeling.pdf (accessed on 8 June 2021).

**Figure 2.**Overview of the area considered for the study: the location of the substation, PV farms and four surrounding weather stations are shown. Map data ©2021 Google.

**Figure 3.**Illustration of the walk-forward validation technique. The test sets, indicated in orange, represent the validation weeks.

**Figure 4.**The autocorrelation of the demand presents daily peaks, which steadily decrease as the lag increases (here, a lag unit represents a 30 min period). The plot displays the autocorrelation for a maximum lag of four weeks.

**Figure 5.**Plots of model predictions for week 1 showing a comparison of the three proposed models with the target.

**Figure 6.**Plots of model predictions for week 3. The prediction of PV power output is more challenging at low generation.

**Figure 7.**Comparison between the prediction and the target for week 1. The ticks in the x axis correspond to midnight for each day.

**Figure 8.**Comparison between the prediction and the target for week 3. The special treatment for holidays leads to an accurate demand prediction for Christmas Eve.

**Figure 9.**Comparison between the battery charge pattern and the PV power generation for week 4. When the battery charge is greater than the PV power, the difference is taken from the grid.

**Figure 10.**Plot of Catboost model’s predictions for week 2. There are some large errors for the evenings of the fifth and sixth day.

**Figure 11.**The top plot shows the target and predicted PV power for week 1, while the bottom plot shows the irradiance measured at the location of the solar panel (which is not available for the prediction) and the irradiance obtained from the weather data at the other geographically spread locations (used in the prediction task).

Name | Meaning |
---|---|

${B}_{k}$ | Battery charge at time k in MW |

${L}_{k}$ | Energy load at time k in MW |

${B}_{min},{B}_{max}$ | Minimum and maximum battery capacity in MW, resp. |

$SO{E}_{k}$ | State-of-energy of battery at time k in MWh |

$SO{E}_{min},SO{E}_{max}$ | Minimum and maximum state-of-energy of battery in MWh, resp. |

${P}_{k}$ | PV power generation at time k in MW |

$TotalCharge$ | Sum of ${P}_{k}$ over all times k in a day |

$TotalSolar$ | Sum of ${Q}_{k}$ over all times k in a day |

${C}_{PV}$ | Coefficient that measures the environmental efficiency of PV power |

$NewPeak$ | Auxiliary variable to store the new peak demand |

S | Auxiliary variable to store the score |

**Table 2.**Comparison of three methods in predicting the PV power for the challenge weeks. The highest ${R}^{2}$ and lowest MSE for each week are highlighted in bold.

Method | Week | ${\mathit{R}}^{2}$ | MSE |
---|---|---|---|

Random forest | 1 | 0.7625 | 0.2845 |

Random forest | 2 | 0.8330 | 0.1125 |

Random forest | 3 | 0.7168 | 0.0209 |

Random forest | 4 | 0.8199 | 0.1806 |

LSTM | 1 | 0.8323 | 0.1983 |

LSTM | 2 | 0.8143 | 0.1060 |

LSTM | 3 | 0.6948 | 0.0245 |

LSTM | 4 | 0.8632 | 0.1610 |

CNN-LSTM | 1 | 0.8539 | 0.1688 |

CNN-LSTM | 2 | 0.8204 | 0.1077 |

CNN-LSTM | 3 | 0.7140 | 0.0218 |

CNN-LSTM | 4 | 0.8544 | 0.1535 |

**Table 3.**Comparison of the three models for demand prediction in the four weeks. The highest ${R}^{2}$ and lowest MSE for each week are highlighted in bold.

Method | Week | ${\mathit{R}}^{2}$ | MSE |
---|---|---|---|

CatBoost | 1 | 0.9222 | 0.0435 |

CatBoost | 2 | 0.9695 | 0.0200 |

CatBoost | 3 | 0.9690 | 0.0239 |

CatBoost | 4 | 0.9443 | 0.0236 |

ANN | 1 | 0.9264 | 0.0412 |

ANN | 2 | 0.9306 | 0.0456 |

ANN | 3 | 0.9678 | 0.0248 |

ANN | 4 | 0.9305 | 0.0295 |

TabNet | 1 | 0.8943 | 0.0592 |

TabNet | 2 | 0.9120 | 0.0577 |

TabNet | 3 | 0.9476 | 0.0403 |

TabNet | 4 | 0.8815 | 0.0502 |

Baseline | 1 | 0.7938 | 0.1154 |

Baseline | 2 | 0.9043 | 0.0628 |

Baseline | 3 | 0.9060 | 0.0724 |

Baseline | 4 | 0.8370 | 0.0691 |

**Table 4.**Scores obtained for each of the four weeks, expressed as a percentage of the optimal solution and disaggregated into demand- and PV power-related factors. For reference, the corresponding score obtained by copying the previous week demand and PV power are included.

Week | Avg. Demand Ratio | Avg. PV Ratio | Avg. Score Ratio | Baseline Score Ratio |
---|---|---|---|---|

1 | 90.7135 | 97.5196 | 88.4466 | 82.3380 |

2 | 85.5383 | 95.7059 | 81.8722 | 79.0595 |

3 | 88.0555 | 99.0025 | 87.1435 | 76.5495 |

4 | 90.2056 | 97.8797 | 88.3836 | 80.4124 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 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 (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Borghini, E.; Giannetti, C.; Flynn, J.; Todeschini, G.
Data-Driven Energy Storage Scheduling to Minimise Peak Demand on Distribution Systems with PV Generation. *Energies* **2021**, *14*, 3453.
https://doi.org/10.3390/en14123453

**AMA Style**

Borghini E, Giannetti C, Flynn J, Todeschini G.
Data-Driven Energy Storage Scheduling to Minimise Peak Demand on Distribution Systems with PV Generation. *Energies*. 2021; 14(12):3453.
https://doi.org/10.3390/en14123453

**Chicago/Turabian Style**

Borghini, Eugenio, Cinzia Giannetti, James Flynn, and Grazia Todeschini.
2021. "Data-Driven Energy Storage Scheduling to Minimise Peak Demand on Distribution Systems with PV Generation" *Energies* 14, no. 12: 3453.
https://doi.org/10.3390/en14123453