Next Article in Journal
Identifying Critical Links in Degradable Road Networks Using a Traffic Demand-Based Indicator
Previous Article in Journal
Ensemble Learning Algorithms for Solar Radiation Prediction in Santo Domingo: Measurements and Evaluation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

BESS Reserve Optimisation in Energy Communities

by
Wolfram Rozas-Rodriguez
1,*,
Rafael Pastor-Vargas
1,
Andrew D. Peacock
2,
David Kane
3 and
José Carpio-Ibañez
4
1
ETS de Ingeniería Informática, Universidad Nacional de Educación a Distancia, 28040 Madrid, Spain
2
School of Energy, Geoscience, Infrastructure and Society (EGIS), Heriot-Watt University, Edinburg EH14 4AS, UK
3
Trilemma Consulting Limited, Glasgow ML4 3NR, UK
4
ETS de Ingenieros Industriales, Universidad Nacional de Educación a Distancia, 28040 Madrid, Spain
*
Author to whom correspondence should be addressed.
Sustainability 2024, 16(18), 8017; https://doi.org/10.3390/su16188017
Submission received: 30 July 2024 / Revised: 2 September 2024 / Accepted: 8 September 2024 / Published: 13 September 2024

Abstract

:
This paper investigates optimising battery energy storage systems (BESSs) to enhance the business models of Local Energy Markets (LEMs). LEMs are decentralised energy ecosystems facilitating peer-to-peer energy trading among consumers, producers, and prosumers. By incentivising local energy exchange and balancing supply and demand, LEMs contribute to grid resilience and sustainability. This study proposes a novel approach to BESS optimisation, utilising advanced artificial intelligence techniques, such as multilayer perceptron neural networks and extreme gradient boosting regressors. These models accurately forecast energy consumption and optimise BESS reserve allocation within the LEM framework. The findings demonstrate the potential of these AI-driven strategies to improve the BESS reserve capacity setting. This optimal setting will target meeting Energy Community site owners’ needs and avoiding fines from the distribution system operator for not meeting contract conditions.

1. Introduction

The optimisation of the use of batteries in renewable energy systems is a challenge that is being analysed and researched. In the case of wind renewable energy, Ref. [1] presents an optimal battery energy storage system (BESS) capacity for the wind farm integration model and its effects of equivalent lifecycle and reserve degree on BESS capacity.
In the solar renewable energy field, efforts are very focused on the optimal operating cost and profitability of battery energy storage system portfolios in different electricity market conditions [2]. Other research works focus on the optimal size of battery energy storage system (BESS) and the optimal scheduling of BESS power, as presented in [3]. The goals of these strategies are to maximise profit and minimise penalty costs.
The optimisation of battery energy storage systems (BESSs) holds particular significance within the framework of Local Energy Markets (LEMs). These markets are defined [4] as decentralised systems that coordinate energy generation, storage, transportation, conversion, and consumption within specific geographic areas [4]. Through the implementation of automated control and demand-side management strategies, LEMs, especially those integrating local Heat, Ventilation, and Air Conditioning (HVAC) production, have the potential to considerably improve energy efficiency, mitigate greenhouse gas emissions, and cultivate energy independence [5].
In previous works [6,7], the solutions focus mainly on optimisation strategies for determining the BESS reserves, but they do not usually follow allocation strategies using artificial intelligence (AI) algorithms. These predictive methods can be used to determine how frequent the “excursions” are. In our case, excursions mean oscillations from minute actual consumption to half-hourly forecast consumption in a certain period to improve the BESS reserve capacity. Knowing the excursion frequency according to different seasons and periods may help to manage BESS reserves optimally to meet Distribution Network Operator (DNO)/Distribution System Operator (DSO) contract conditions. Not meeting real-time load constraints may generate an Energy Community burden in contractual penalties from DNOs/DSOs, or operational impacts due to local power system outages.
Figure 1 illustrates an actual minute vs. half-hourly forecast load kW comparison. Estimated deviations named “excursions” show evidence of higher BESS capacity than foreseen. They are represented in yellow.
The reserve capacity depends on the number and magnitude of excursions [8], so focusing on this magnitude, it is possible to optimise the BESS reserve capacity by providing IA inference models that can be used to predict the excursions. It is also necessary to define evaluation metrics that allow for the comparison of current and new models in terms of performance and quality. There are several key performance indicators, but almost all fall into the economic and technical benefits category for different prosumer types [9]. This work has defined two key performance indicators (KPIs) to optimise the BESS management. KPI1 is named excursion size categories, and KPI2 is named forecast/actual energy %. KPI2 is defined as the ratio of the minute actual energy over the half-hourly forecast energy, so it measures the behaviour of the consumption energy deviations from the predictive model.
There are many AI algorithms to apply to these types of datasets, such as the classic forecasting [10] or the support vector machine [11]. Some of them are involved in the modelling and prediction of behavioural and production profiles [12]. However, given their limitations, these models cannot detect complex patterns such as those in this particular case of “excursions”. These patterns can be detected with machine learning techniques like neural networks (multilayer perceptron) [13] and gradient boosting regressor algorithms [14]. After training many predictive models for consumption with statistical, machine learning, deep learning, and hybrid methods, these two machine learning techniques were selected because of their excellent accuracy and generalisation results. The main features of algorithms chosen are:
(i)
A multilayer perceptron (MLP) is a fundamental feedforward neural network architecture designed by Frank Rosenblatt and is composed of at least three layers: an input layer, one or more hidden layers, and an output layer. As illustrated in Figure 2, MLPs possess a property known as the universal approximation theorem. This theorem establishes that an MLP with a sufficient number of hidden units can approximate any continuous function with arbitrary accuracy. This capability, coupled with its ability to learn from data, has solidified the MLP’s status as a cornerstone in various fields, including pattern recognition, function approximation, and prediction.
(a)
Neurons in consecutive layers are fully interconnected, with each connection possessing an associated weight. The input layer receives raw data, which are transformed through the hidden layers via non-linear activation functions. These functions introduce non-linearity, allowing the network to learn complex patterns and representations. The output layer produces the final prediction based on the processed information from the hidden layers.
(b)
Training an MLP involves an iterative weight adjustment process through backpropagation, an algorithm that calculates the gradient of the error function concerning the network weights. This gradient information is then used to update weights to minimise prediction error. The learning capacity of the MLP is influenced by various factors, including the number of hidden layers, the number of neurons per layer, the choice of activation functions, and the optimisation algorithm employed.
(c)
Backpropagation relies on differentiable functions. To function correctly, backpropagation requires that both the combination of inputs and weights (typically a weighted sum) and the activation function (such as rectified linear unit -ReLU-) within a neuron are differentiable. Moreover, these derivatives should be bounded as a gradient descent optimiser (other more powerful gradient descent-based optimisers like Adam are also used), which is commonly employed to optimise multilayer perceptrons.
(d)
The backpropagation process iteratively adjusts weights. In each iteration, forward propagation calculates the output for a given input, and the mean squared error (or other validation metric) is computed between the predicted and actual values. Subsequently, backpropagation calculates the error gradient concerning the weights. These gradients are used to update the weights, moving them closer to a minimum error configuration. Equation (1) shows how the current iteration (called epoch in the neural network domain) gradient is computed as the bias ( ϵ ) times the error derivative with respect to every neuron’s weight and the α learning rate (an arbitrary rate not too big, and not too small) times the previous iteration gradient. This process continues until the gradient converges, indicating minimal change in weight updates and optimisation convergence.
Δ ω ( t ) = ϵ d E d ω ( t ) + α Δ ω ( t 1 )
(e)
The MLP is a versatile computational model capable of approximating any continuous function with arbitrary accuracy, provided sufficient complexity. This property and its ability to learn from data have established it as a cornerstone in fields like pattern recognition that can be applied to electrical consumption prediction.
(ii)
Gradient boosting regressor: The gradient boosting regressor is an eXtreme gradient boosting (the acronym XGB will be used to refer to this algorithm in this work) algorithm for regression, which is a powerful ensemble method (see Figure 3). It sequentially combines a set of weak learners, typically decision trees, to create a predictive model that continually enhances predictions. Unlike conventional methods that aim to minimise prediction error directly, the gradient boosting regressor employs the negative gradient of the loss function to guide the learning process. It has the following characteristics:
  • Ensemble Method: the technique combines multiple weak learners to develop a more robust final model.
  • Iterative Learning: the model is created one tree at a time, with each subsequent tree focusing on improving the predictions where previous trees made errors.
  • Gradient-Based Learning: the negative gradient of the loss function is utilised to select new trees, emphasising areas with errors.
  • Flexibility: the choice of weak learners and hyperparameters can be adjusted to enable the technique to adapt to different data types and regression tasks.
XGB optimises an objective function that measures how well a model trains. This function breaks down into:
(a)
Objective function is defined (see Equation (2)) as the sum of a loss function and a regularisation term.
(b)
The loss function measures the predictability of the model.
(c)
The regularisation term measures the complexity of the model and helps determine an accurate and stable model.
(d)
XGBoost is a CART decision tree ensemble model, similar to Random Forest, but different in how it is trained. XGBoost optimises the objective function shown in Equation (2).
O b j = j G j 2 H j + λ + 3
Obj represents the overall objective function that XGBoost aims to minimise. Σ j is the summation symbol, meaning the summation over all leaves (j) in the tree. Gj is the sum of gradients on leaf j. It measures how much the predictions on leaf j need to be adjusted to reduce the loss. Hj is the sum of Hessians on leaf j. It measures the curvature of the loss function. λ is the regularisation term, which helps prevent overfitting by penalising complex models. The ‘3’ is a constant term, which does not affect the optimisation process and can be ignored.
(e)
The ensemble model sums the prediction of several trees together. Finally, the efficiency of the tree structure is measured using the regularisation term. This score is like the measure of impurities in a decision tree, except that it also considers the complexity of the model.
Time-series regression methods are supervised learning methods that forecast the consumption objective variable of the proposed predictive models. Machine learning methods need a sliding window strategy to analyse time-series data. The sliding window strategy involves transforming the data into a matrix where each value is associated with the time window that comes before it, as shown in Figure 4. This transformation can also take into account exogenous variables. Once transformed, a regression model can be trained to predict the next value in the series. Each row in the training data represents a separate instance, with values at previous time windows used as predictors for the target value at the next time window. This is considered an example. That way, the supervised learning method may be used to learn with examples. The model must consider all dependent and external variable time lags to predict the dependent variable at a given time step accurately.
Optimisation methods in the field of electrical energy storage are aimed at maximising the efficiency, profitability, and overall performance of BESS [7,18,19,20,21,22,23]. The primary techniques utilised today in the renewable energy besides machine learning are mathematical optimisation and metaheuristic algorithms.
Mathematical optimisation methods include:
(i)
Linear Programming (LP): This is suitable for problems with linear objective functions and constraints. It is used for basic energy arbitrage or peak shaving.
(ii)
Non-linear Programming (NLP): this handles the non-linear relationships essential for modelling system dynamics.
(iii)
Mixed-Integer Programming (MIP): this combines continuous and integer variables, useful for problems with discrete decisions like charging/discharging schedules or unit commitment.
(iv)
Dynamic Programming (DP): this is effective for sequential decision-making problems, such as optimal charging strategies considering future price forecasts.
Metaheuristic evolutionary optimisation algorithms: these reproduce the behaviour of nature in many aspects. A small list is selected, but the list of evolutionary optimisers applied to renewable energy nowadays is long.
(i)
Genetic Algorithms (GAs): these algorithms imitate natural selection to find optimal solutions, making them suitable for complex and non-convex problems.
(ii)
Particle Swarm Optimisation (PSO): inspired by bird flocking or fish schooling, this method is efficient for solving continuous optimisation problems.
(iii)
Ant Colony Optimisation (ACO): this technique is used to find optimal paths or configurations based on the behaviour of ants.
(iv)
Many more evolutionary optimisers are used in renewable energy: grey wolf optimiser, artificial bee colony, bat algorithm, moth–flame optimiser, etc. They are based on identifying the optimal solutions determined by the objective function. These solutions are then combined through a process known as crossover and are further improved by introducing mutations, which are random changes.
The selected methods of this paper (MLP-NN and XGR) belong to the machine learning category which presents produce stable models with the capacity to unveil non-linear relationships among explanatory variables. This work proposal is to use the AI-based predictive model results (consumption forecasts) as inputs of conventional optimisation techniques in a two-stage method to improve the optimiser search.
This paper presents how to properly set the BESS reserve capacity guided by highly granular predictive AI models for consumption. This work verifies two main hypotheses:
First Ho: the results of the predictive models can be used to manage the BESS more optimally.
Second Ho: the results obtained with current optimisation techniques can be improved by using a highly granular consumption forecast as inputs of the optimisation problem.

2. Materials and Methods

As mentioned, AI algorithms will create predictive models for the consumption excursions. AI algorithms need datasets to be trained, and this research will use a particular algorithm corresponding to the Cornwall Local Energy Market [24]. The Cornwall Local Energy Market trial has produced a comprehensive and fully documented dataset, referred to as [25], which encompasses detailed energy consumption measurements, battery energy storage system state of charge, and site-specific information. These standardised data points were gathered at a minute frequency and are integral to all analysed LEM case studies. Furthermore, the dataset incorporates consumption and production forecasts, weather data, and detailed BESS specifications.
The Cornwall LEM dataset is accompanied by a comprehensive data dictionary. Trilemma Consulting conducted in-depth analyses of site metadata, fleet self-consumption, and BESS utilisation. Collectively, these resources yield a detailed comprehension of the Energy Community’s composition, consumption patterns, generation capabilities, and energy storage dynamics.
The predictive models for consumption will use the exogenous variables list described in Table 1, which incorporates power flows (energies measured in kWh), state of charge %, and meteorological variables (precipitation, wind, solar irradiation). This final table to train the models was produced with data coming from the Cornwall LEM dataset aggregated at a half-hourly granularity level.
The methodology used to develop the forecasting models follows the standard open-source methodology CRISP-DM [26]. This methodology starts by defining the Energy Community BESS management problem. In our case, it determines the BESS reserves capacity by knowing the deviations from the minute actual vs. the half-hourly forecast consumption. Once the consumption model is specified, there will be a data description stage to understand how consumption behaves by season, different time scales (12 h time window, week, month), and different aggregation levels (whole fleet or specific sites). The data preparation stage will cleanse and normalise the data. As the consumption is a time series, a sliding window will be built to train the predictive model. Finally, the model is trained and assessed using selected machine learning techniques. Model assessment will use the RMSE, MSE, MAE, and R2 metrics. Finally, the methodology states the model deployment, which means the digital transformation of BESS reserves capacity using this predictive model, the BESS management performance monitoring, and the model’s performance monitoring.
The tool for designing and running predictive models is the IBM SPSS Modeler. This visual tool produces diagrams containing all phases of model design, running, and validation. Figure 5 shows the general diagram that builds the whole model, following all stages defined by CRISP-DM methodology.
Following the methodology for developing predictive models, the experimentation started with data acquisition from the Cornwall LEM dataset [25]. Some tables were previously integrated at the site level (Cornwall LEM Energy Community had 100 dwellings) to obtain the consumption dataset with identified exogenous variables. The main table contained web scrapped data from Cornwall LEM site owners’ microgrid management web applications. The main table containing minute granularity level information from power and storage flows (as in Table 1) that were crossed with meteorological data at the minute granularity level. Finally, the dataset was aggregated at a half-hourly granularity level. The model diagram Figure 5 follows the CRISP-DM methodology and includes the following data pre-processing, modelling and assessment, and graphical analysis tasks:
(i)
Data Selection: the data time horizon was reduced to a year, specifically 1 April 2019–31 March 2020.
(ii)
Data Auditing and Preparation: All missing values were replaced by median values. Outliers’ values were replaced by lower and upper bounds using Tukey’s Box and Whiskers method [27]
(iii)
Model training with MLP-NN and XGB methods. This task is represented in the subdiagram in Figure 6 and explained later in detail.
(iv)
Accuracy and stability validation. Accuracy was measured by using RMSE, MSE, MAE, and R2 metrics. Model stability tests are based on ANOVA tests. This task is represented in the subdiagram contained in Figure 6 and explained later.
(v)
Graphical analysis of half-hourly forecasting model compared against actual minute data by season (summer, winter and shoulder) and 12 hour/week/month lapses, and at different aggregation levels (whole fleet or specific sites).
Figure 6 presents the model training and validation subdiagram with the selected machine learning methods (MLP-NN and XGB). The subdiagram includes the following tasks:
(i)
Model specification: Both target and input variables are declared in the model. Input variables include all exogenous variables and their corresponding lags to create the sliding window. Twenty-four lags were defined at a half-hourly granularity level.
(ii)
Feature extraction: The relevant exogenous variables were extracted using a significance test. The null significance hypothesis was set, as there is no correlation between consumption and the exogenous variables, and is measured using the p-value; the hypothesis is rejected when the p-value is ≤ 0.05. In that case, the feature or exogenous variable is considered significant.
(iii)
Sliding window creation: all target and input variables lags are created to define the sliding window. Twenty-four lags at a half-hourly granularity level were defined, meaning a 12-h input window in the model. The output window size is used to predict the next half-hour.
(iv)
Model training with MLP-NN and XGB methods
(v)
Accuracy and stability validation: Accuracy was measured against actual data on consumption minutes. The analysis compared the models’ half-hourly forecast against the actual minute data to derive the “excursions”, or residuals. Model stability tests used ANOVA tests, validating the error variance equality hypotheses in all partitions. If the p-value is less or equal to 0.05, the error variance equality hypothesis is rejected, making the model unstable.
Figure 6. Half-hourly consumption modelling and assessment stage subdiagram.
Figure 6. Half-hourly consumption modelling and assessment stage subdiagram.
Sustainability 16 08017 g006
Figure 7 exhibits a graphical analysis of half-hourly forecasts against minute actual consumption kW in a shoulder season week at day-of-week and half-hour granularity level. MLP-NN model forecasts are green, while XGB model forecasts are orange. Actual minute data are in blue. A day-of-the-week (weekly) pattern emerges throughout the day at half-hour granularity level.

3. Experimentation & Results

Several forecasting models were developed to estimate the consumption kW at a half-hourly granularity level with two machine learning methods: multilayer perceptron neural network (MLP-NN) and eXtreme gradient boost (XGB). Table 2 presents the models’ validation metrics (RMSE and MAE measured in kW, and MSE would be measured in kW2).
Both models are stable as they passed the stability test. The ANOVA test was performed with the data partitioning: training subset (60%—917,346 observations), testing subset (30%—457,558 observations), and validation subset (10%—153,542 observations). ANOVA tests produced the following p-values: MLP-NN model: 0.315 and XGB model: 0.814. The analysis cannot reject the hypotheses, so both models are stable.
These accurate and stable models are not theoretical constructs but practical tools used to estimate consumption kW at a half-hourly level. The estimates are then compared against the actual consumption kW at a minute level to analyse behaviour deviations by the whole fleet or an individual site. Once the models are trained, they must be evaluated using the two KPIs mentioned in the introduction and developed further on in Section 3.1 and Section 3.2. Both models were stable and accurate, but XGB was slightly more accurate than MLP-NN, which is the recommended method for this work. In specific cases, these models’ accuracy difference may imply a relevant penalty variation when not meeting the DNO/DSO contract conditions.
Graphical analysis is shown in Figure 8 that compares half-hourly forecast (MLP-NN model in green colour and XGB model in orange colour) vs. minute actual consumption kW (blue colour) for an average site in the whole fleet in a shoulder season 12 h period by minute.
Figure 9 also shows half-hourly forecast (with the MLP-NN model in green and the XGB model in orange) vs. minute actual consumption kW (in blue), but in this case for the site 100 (a heavy consumption site) in a winter season week by half-hour. This low granularity level analysis performs better the excursions.

3.1. KPI1 Excursion Size Categories

Excursion (residuals), refering to oscillation, is the absolute value between minute consumption kW and half-hourly forecast consumption kW. This indicator shows how often the actual consumption is over or under the forecast, which may help optimise the BESS reserve capacity.
KPI1 is a nominal variable measuring the excursion/residual size. Excursion size categories are defined according to the distribution analysis of MLP-NN and XGB model residuals performed at whole fleet (100 dwellings) or individual site (site 100 was selected because of its considerable consumption) levels.
The residuals obtained from the comprehensive distribution analysis of the whole fleet are segmented in Table 3. Residual sizes are defined as SMALL, MEDIUM or BIG using the residual distribution quartiles. Notably, the maximum residuals are 0.914 kW with the MLP-NN model and 0.590 kW with the XGB model. This thorough analysis forms the basis for the discretisation of KPI1, as shown in Table 4.
Based on the residual distribution of Table 3, KPI1 is considered as residual size, measured in kW and categorised as in Table 4.
Figure 10 exhibits the KPI1 for the whole fleet from 1 April 2019–31 March 2020. KPI1 is segmented as BIG (in blue) when residuals are greater or equal to 0.08 kW; MEDIUM (in green) if they belong to (0.029, 0.08) kW interval; and SMALL (in orange) if they are lesser or equal to 0.029 kW.
The same distribution analysis is performed only for a dwelling. Site 100 was selected because of its high consumption. Residual metrics are shown in Table 5. It should be noted that the maximum residuals are 3.957 kW with the MLP-NN model and 4.006 kW with the XGB model. Other KPI1 analyses at different granularity levels and seasons may be found at [28] and are available for other researchers.

3.2. KPI2 Forecast vs. Actual Energy %

Consumption power (kW) is the instantaneous rate at which energy is used and is converted to consumption energy (kWh) over a specific period. To calculate consumption energy, we multiply power by the duration of the period. For instance, the half-hourly forecast consumption energy is 0.5 times the half-hourly forecast consumption power, and minute consumption energy is (1/60) times the minute consumption power. KPI2 defines a ratio to measure the proportion of forecasted energy over actual energy and is computed according to:
K P I 2 = F E A E %
The descriptive statistics of KPI2 are presented in Table 6.
Figure 11 exhibits the KPI2 graphical analysis for the whole fleet during 12 h in the summer season. The KPI2 smoothing average increases from approximately 5% from 0:00 h to 6:00 h to approximately 6% from 6:00 h to noon.
Figure 12 changes the KPI2 scale to the whole summer month period, showing the forecast/actual energy % for the average site of the entire fleet. The smoothing average of KPI2 around 4% means the forecast energy is slightly more significant than the actual data for most of the period (the atypical residual with a high residual is significant).

4. Discussion

The results of the proposed predictive models are very accurate when comparing actual minute data against half-hourly forecasting data.
Two key performance indicators were defined to manage the BESSs better. KPI1 shows the “excursions” or half-hourly forecast deviations from the actual minutes of the data. This KPI1 was discretised, showing that the residuals were mostly minimal. KPI2 was defined as a ratio between the half-hourly forecast and the minute actual consumption energies. This KPI2 has been represented at a half-hourly granularity level centred at the small 0.05% value, indicating potential cost savings from accurate consumption forecasting. These two KPIs will help the Energy Community set their BESS reserves accurately, potentially saving them from fines with its DNO/DSO.
As for the hypotheses set, they have been validated with the presented results:
(i)
The results of the predictive models can be used to manage the BESS more optimally with the defined KPIs. The trained predictive consumption models have produced accurate and stable results that allow the Energy Community to set proper BESS reserves aligned with actual consumption. Evidence of these results has been detailed in Table 2, Table 3, Table 4 and Table 5, and Figure 10, Figure 11 and Figure 12.
(ii)
Optimisation models used to determine BESS are based on mathematical models, primarily linear approximations. The machine learning methods used in this work (MLP-NN and XGB) are non-linear approximations that may capture consumption dynamics more precisely and help them in their search process as inputs to the optimisation problem.
Finally, future research may consist of improving the predictive model’s accuracy and stability. Two directions are given:
(i)
Augment the granularity to high-frequency models based on minute data. Half-hourly granularity level forecasting models may not capture extreme variable weather conditions.
(ii)
Try other predictive methods like hybrid methods of deep learning techniques. Combining convolutional neural networks (CNNs) and recurrent neural networks like LSTM, GRU, Bi-directional LSTM, or Bi-directional GRU may improve model accuracy and stability by capturing highly non-linear relations among the variables used in the model.

5. Conclusions

Maximising battery energy storage involves various procedures, with the most extended and conventional ones relying on optimisation strategies. However, optimising processes can be further enhanced by integrating predictive tools powered by artificial intelligence algorithms. Combining prediction and optimisation techniques in a two-stage model produces a better performance scenario. Better demand forecasts help optimisers get a better objective function configuration meeting all site constraints (load balance, minimum operational and reserve capacity, BESS longevity, etc.).
This work highlights how the Consumption estimated with artificial intelligence methods can optimise the management of BESS reserves. The optimal scenario is that BESS reserves will meet LEM Energy Community needs and avoid supply contract fines from DNO/DSO when over-demanding. With this information, the Energy Community will optimally set their minimum operational and reserve capacity levels—the first to serve site owners’ needs. The second is to graduate potential reserve capacity to be sold in the market but meet DNO/DSO contract conditions and avoid fines.
As for the potential economic impact of optimising BESS management, Trilemma Consulting in their [29] made assumptions for the import and export tariffs that help to get an idea of the maximum absolute performance by MWh. Export tariff was assumed at 0.15 £/MWh and import tariff as 0.055 £/MWh in the Cornwall LEM, so the maximum absolute performance is 0.095 £/MWh. The relative maximum absolute performance by MWh can be computed as:
export tariff import tariff import tariff = 172.72 %
Trilemma Consulting also computed the annual earnings potential in the “A Whistle-stop Tour” presentation on Cornwall LEM Residential Project [29]. The maximum annual earnings potential managing the BESS Headroom % (the available BESS to be charged) was estimated in 125 £ for a 5 kWh battery; 187.50 £ for a 7.5 kWh battery; and 250 £ for a 10 kWh battery.
This work experimented with consumption data from the Cornwall LEM dataset [25] at different aggregation levels: whole fleet or specific site. IA-based consumption and predictive models’ accuracy were measured as high, and the model’s stability was not rejected. Applying this predictive model to the conventional optimisation methods as inputs can improve the optimal scenario search.
There are two primary analyses in this research. The first analysis is the Excursion Size Categories, which explores the amount and size of the excursion or residuals. It measures the models’ accuracy. The second analysis Actual vs. Forecast Energies Comparison presents the performance of the half-hourly forecast against the minute actual data by different seasons, days of the week, and half-hour lapses.
Although the consumption forecasting models proposed in this work showed good performance, they have limitations. Consumption forecasting models may improved in two directions of future research:
  • Finer forecasting granularity level. Minute forecasting models will better adjust the BESS management. These models can better capture complex pattern consumption variations at different times (12 h, week, month, day of week) or site aggregation (whole fleet or specific site) granularity levels.
  • MLP-NN and XGB methods belong to the Shallow Machine Learning category. They can be surpassed with Deep Learning and Hybrid methods that can capture better non-linearities and have a better memory or attention.
    -
    Most Deep Learning methods used today in consumption forecasting include:
    *
    Convolutional Neural Networks (CNN) to extract features [30]
    *
    Recurrent Neural Networks (RNN) to forecast time series like the Consumption. RNNs most used in this problem are Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), Bi-Directional LSTM, and Bi-Directional GRU methods. All these methods develop a memory of important events during the time and forget the rest [31]
    *
    Transformers are deep-learning methods that simultaneously pay attention to important events at different places. There are brand new algorithms applied to regression problems like N-Beats by Yoshua Bengio [32] or the Temporal Fusion Transformer (TFT) [33]
    -
    There are interesting hybrid methods like the TSFEDL [34] library, designed for time-series analysis. The library incorporates 22 advanced models that combine convolutional and recurrent neural networks to extract meaningful spatio-temporal patterns from time-series data.
Finally, the authors want to point out other applications which may be attractive to other researchers. Estimating the After Diversity Maximum Demand (ADMD) [35] helps to optimise the local distribution network size. These predictive models minimise the Energy Community infrastructure investment but meet site owners’ needs.

Author Contributions

Conceptualization, R.P.-V., W.R.-R., A.D.P., D.K. and J.C.-I.; software, W.R.-R.; methodology, W.R.-R., R.P.-V. and J.C.-I.; data curation, W.R.-R.; validation, W.R.-R., R.P.-V. and A.D.P.; formal analysis, W.R.-R., R.P.-V., A.D.P. and D.K.; investigation, W.R.-R., R.P.-V. and A.D.P.; writing—original draft preparation, W.R.-R.; writing—review and editing, R.P.-V., A.D.P., D.K. and J.C.-I.; supervision, J.C.-I.; funding acquisition, R.P.-V. and J.C.-I. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Universidad Nacional de Educación a Distancia (UNED) grant from Annual Research Funding program, including APC.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

The authors express their gratitude to UNED for its support and funding of the publication fees. Also, we thank Dan Nicholls from Centrica PLC for sharing the Cornwall LEM dataset.

Conflicts of Interest

Author David Kane was employed by the company Trilemma Consulting Limited. The remaining author declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
BESSBattery Energy Storage System
DNO – DSODistribution Network Operator/Distribution System Operator
HVACHeat, Ventilation, and Air Conditioning (HVAC)
KPIKey Performance Indicator
LEMLocal Energy Market
MLPMultilayer Perceptron
XGBeXtreme Gradient Boost
XGReXtreme Gradient Regressor

References

  1. Zeng, K.; Liu, J.; Wang, H.; Zhou, Y.; Zhou, S. Supportive Analysis of Battery Energy Storage System on Electricity Market Scheduling Considering Load and Wind Power Fluctuation; Institute of Electrical and Electronics Engineers Inc.: Wuhan, China, 2021. [Google Scholar] [CrossRef]
  2. Agrela, J.C.; Rezende, I.; Soares, T. Analysis of battery energy storage systems participation in multi-services electricity markets. In Proceedings of the 2022 18th International Conference on the European Energy Market (EEM), Ljubljana, Slovenia, 13–15 September 2022; IEEE Computer Society: Washington, DC, USA, 2022. [Google Scholar] [CrossRef]
  3. Subroto, R.K.; Gebbran, D.; Moreno, A.B.; Dragicevic, T. BESS Optimal Sizing and Scheduling for Energy Arbitrage and Frequency Containment Reserve via Dual-Loop Optimization; Institute of Electrical and Electronics Engineers Inc.: Piscataway, NJ, USA, 2022; pp. 941–946. [Google Scholar] [CrossRef]
  4. Faia, R.; Pinto, T.; Vale, Z.; Corchado, J.M. A Local Electricity Market Model for DSO Flexibility Trading. In Proceedings of the International Conference on the European Energy Market, EEM, Ljubljana, Slovenia, 18–20 September 2019. [Google Scholar]
  5. Capper, T.; Gorbatcheva, A.; Mustafa, M.A.; Bahloul, M.; Schwidtal, J.M.; Chitchyan, R.; Andoni, M.; Robu, V.; Montakhabi, M.; Scott, I.J.; et al. Peer-to-peer, community self-consumption, and transactive energy: A systematic literature review of local energy market models. Renew. Sustain. Energy Rev. 2022, 162, 112403. [Google Scholar] [CrossRef]
  6. Do, L.P.C.; Štefan, L.; Molnár, P. Residual electricity demand: An empirical investigation. Appl. Energy 2020, 283, 116298. [Google Scholar] [CrossRef]
  7. Sheha, M.; Powell, K. Using real-time electricity prices to leverage electrical energy storage and flexible loads in a smart grid environment utilizing machine learning techniques. Processes 2019, 7, 870. [Google Scholar] [CrossRef]
  8. Psarros, G.N.; Karamanou, E.G.; Papathanassiou, S.A. Feasibility Analysis of Centralized Storage Facilities in Isolated Grids. IEEE Trans. Sustain. Energy 2018, 9, 1822–1832. [Google Scholar] [CrossRef]
  9. Okwuibe, G.; Gazafroudi, A.; Hambridge, S.; Dietrich, C.; Trbovich, A.; Shafie-Khah, M.; Tzscheutschler, P.; Hamacher, T. Evaluation of Hierarchical, Multi-Agent, Community-Based, Local Energy Markets Based on Key Performance Indicators. Energies 2022, 15, 3575. [Google Scholar] [CrossRef]
  10. Das, U.K.; Tey, K.S.; Seyedmahmoudian, M.; Mekhilef, S.; Idris, M.Y.I.; Deventer, W.V.; Horan, B.; Stojcevski, A. Forecasting of photovoltaic power generation and model optimization: A review. Renew. Sustain. Energy Rev. 2018, 81, 912–928. [Google Scholar] [CrossRef]
  11. Zendehboudi, A.; Baseer, M.A.; Saidur, R. Application of support vector machine models for forecasting solar and wind energy resources: A review. J. Clean. Prod. 2018, 199, 272–285. [Google Scholar] [CrossRef]
  12. Rozas, W.; Pastor-Vargas, R.; García-Vico, A.M.; Carpio, J. Consumption-Production profile categorization in Energy Communities. Energies 2023, 16, 6996. [Google Scholar] [CrossRef]
  13. Bermejo, J.F.; Fernández, J.F.; Polo, F.O.; Márquez, A.C. A review of the use of artificial neural network models for energy and reliability prediction. A study of the solar PV, hydraulic and wind energy sources. Appl. Sci. 2019, 9, 1844. [Google Scholar] [CrossRef]
  14. Wang, J.; Li, P.; Ran, R.; Che, Y.; Zhou, Y. A Short-Term Photovoltaic Power Prediction Model Based on the Gradient Boost Decision Tree. Appl. Sci. 2018, 8, 689. [Google Scholar] [CrossRef]
  15. Bento, C. Multilayer Perceptron Explained with a Real-Life Example and Python Code: Sentiment Analysis. Available online: https://towardsdatascience.com/multilayer-perceptron-explained-with-a-real-life-example-and-python-code-sentiment-analysis-cb408ee93141 (accessed on 16 August 2024).
  16. Geeks, G. Gradient Boosting in ML. Available online: https://www.geeksforgeeks.org/ml-gradient-boosting/ (accessed on 29 July 2024).
  17. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  18. Mosavi, A.; Salimi, M.; Ardabili, S.F.; Rabczuk, T.; Shamshirband, S.; Varkonyi-Koczy, A.R. State of the art of machine learning models in energy systems, a systematic review. Energies 2019, 12, 1301. [Google Scholar] [CrossRef]
  19. Wong, S. Valuing Energy Storage in Electricity Grids: A Machine Learning Approach. Ph.D. Thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, 2018. [Google Scholar]
  20. Cordeiro-Costas, M.; Villanueva, D.; Eguía-Oller, P. Optimization of the electrical demand of an existing building with storage management through machine learning techniques. Appl. Sci. 2021, 11, 7991. [Google Scholar] [CrossRef]
  21. Heinrich, F.; Klapper, P.; Pruckner, M. A comprehensive study on battery electric modeling approaches based on machine learning. Energy Inform. 2021, 4, 17. [Google Scholar] [CrossRef]
  22. Khan, H.; Nizami, I.F.; Qaisar, S.M.; Waqar, A.; Krichen, M.; Almaktoom, A.T. Analyzing Optimal Battery Sizing in Microgrids Based on the Feature Selection and Machine Learning Approaches. Energies 2022, 15, 7865. [Google Scholar] [CrossRef]
  23. Vasconcelos, A.; Monteiro, A.; Costa, T.; Rode, A.C.; Marinho, M.H.; Filho, R.D.; Maciel, A.M. Sizing with Technical Indicators of Microgrids with Battery Energy Storage Systems: A Systematic Review. Energies 2023, 16, 8095. [Google Scholar] [CrossRef]
  24. Giordano, A.; Mastroianni, C.; Menniti, D.; Pinnarelli, A.; Scarcello, L.; Sorrentino, N. A Two-Stage Approach for Efficient Power Sharing within Energy Districts. IEEE Trans. Syst. Man Cybern. Syst. 2021, 51, 1679–1689. [Google Scholar] [CrossRef]
  25. Nicholls, D.; Kane, D. Cornwall LEM Residential Electricity Dataset with Solar Production and Battery Storage, 2018–2020. Data Collection. 2021. Available online: https://reshare.ukdataservice.ac.uk/854578/ (accessed on 29 July 2024).
  26. Chapman, P.; Clinton, J.; Kerber, R.; Khabaza, T.; Reinartz, T.; Shearer, C.W.R. CRISP-DM 1.0; NCR Systems Engineering: Germantown, MD, USA; Copenhagen, Denmark; DaimlerChrysler AG: Stuttgart, Germany; SPSS Inc.: Chicago, IL, USA; OHRA Verzekeringen en Bank Groep B.V.: Arnhem, The Netherlands, 2000. [Google Scholar]
  27. Tukey, J.W. Exploratory Data Analysis; Addison-Wesley: Boston, MA, USA, 1977. [Google Scholar]
  28. Rozas, W. Other KPI1 Analyses at Different Granularity Levels. Available online: https://unedo365-my.sharepoint.com/:f:/g/personal/crozas2_alumno_uned_es/EjhweZ-OpOJFgq-cbPPdCVkB9HG0HXDr_DCwijP-AXHMMg?e=HWkqeY (accessed on 29 July 2024).
  29. Kane, D.; Peacock, A.; McCallum, A. Cornwall Local Energy Market Residential Project. A Whistle Stop Tour. Available online: https://www.centrica.com/media/4627/4-dkaneapeacock-lem-project-outcomes-residential.pdf (accessed on 29 July 2024).
  30. Saha, S. A Comprehensive Guide to Convolutional Neural Networks—The ELI5 Way. Available online: https://saturncloud.io/blog/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way/ (accessed on 29 July 2024).
  31. Bengio, Y.; Chung, J.; Gulcehre, C.; Cho, K. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
  32. Oreshkin, B.N.; Carpov, D.; Chapados, N.; Bengio, Y. N-Beats: Neural Basis Expansion Analysis for Interpretable Time Series Forecasting. In Proceedings of the 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, 26–30 April 2020; pp. 1–31. [Google Scholar]
  33. Lim, B.; Arik, S.O.; Loeff, N.; Pfister, T. Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting. Int. J. Forecast. 2021, 37, 1748–1764. [Google Scholar] [CrossRef]
  34. Aguilera-Martos, I.; García-Vico, Á.M.; Luengo, J.; Damas, S.; Melero, F.J.; Valle-Alonso, J.J.; Herrera, F. TSFEDL: A python library for time series spatiotemporal feature extraction and prediction using deep learning. Neurocomputing 2023, 517, 223–228. [Google Scholar] [CrossRef]
  35. Barteczko-Hibbert, C. After Diversity Maximum Demand (ADMD) Report; Clnr-L217; Durham University: Durham, UK, 2015. [Google Scholar]
Figure 1. (Left) Minute actual vs. half-hourly forecast consumption kW data. (Right) BESS capacity with minimum operational [Min(*)] and maximum reserve capacity Max(*) values.
Figure 1. (Left) Minute actual vs. half-hourly forecast consumption kW data. (Right) BESS capacity with minimum operational [Min(*)] and maximum reserve capacity Max(*) values.
Sustainability 16 08017 g001
Figure 2. Multilayer perceptron (MLP) [15].
Figure 2. Multilayer perceptron (MLP) [15].
Sustainability 16 08017 g002
Figure 3. Gradient boosting regressor [16].
Figure 3. Gradient boosting regressor [16].
Sustainability 16 08017 g003
Figure 4. Time-series sliding window [17].
Figure 4. Time-series sliding window [17].
Sustainability 16 08017 g004
Figure 5. Half-hourly consumption forecasting model diagram.
Figure 5. Half-hourly consumption forecasting model diagram.
Sustainability 16 08017 g005
Figure 7. Half-hourly forecast (MLP-NN and XGB models) vs. minute actual consumption kW in a shoulder season week by day of week and half-hour. Green line: half-hourly MLP-NN, orange line: half-hourly XGB forecast, blue line: minute actual data.
Figure 7. Half-hourly forecast (MLP-NN and XGB models) vs. minute actual consumption kW in a shoulder season week by day of week and half-hour. Green line: half-hourly MLP-NN, orange line: half-hourly XGB forecast, blue line: minute actual data.
Sustainability 16 08017 g007
Figure 8. Half-hourly forecasts (MLP-NN and XGB model) vs. minute actual consumption kW for the average site in a shoulder season 12 h period by minute. Green line: half-hourly MLP-NN, orange line: half-hourly XGB forecast, blue line: minute actual data.
Figure 8. Half-hourly forecasts (MLP-NN and XGB model) vs. minute actual consumption kW for the average site in a shoulder season 12 h period by minute. Green line: half-hourly MLP-NN, orange line: half-hourly XGB forecast, blue line: minute actual data.
Sustainability 16 08017 g008
Figure 9. Half-hourly actual vs. forecast consumption (MLP-NN and XGB) for site 100 in a winter season week. Green line: half-hourly MLP-NN, orange line: hal-hourly XGB forecast; blue line: minute actual data.
Figure 9. Half-hourly actual vs. forecast consumption (MLP-NN and XGB) for site 100 in a winter season week. Green line: half-hourly MLP-NN, orange line: hal-hourly XGB forecast; blue line: minute actual data.
Sustainability 16 08017 g009
Figure 10. KPI1 (excursion size categories) for the whole fleet during the period 1 April 2019–31 March 2020.
Figure 10. KPI1 (excursion size categories) for the whole fleet during the period 1 April 2019–31 March 2020.
Sustainability 16 08017 g010
Figure 11. KPI2 forecast vs. actual energy for the whole fleet in a summer season 12 h period.
Figure 11. KPI2 forecast vs. actual energy for the whole fleet in a summer season 12 h period.
Sustainability 16 08017 g011
Figure 12. KPI2 forecast/actual energy % for the whole fleet during a month in the summer season.
Figure 12. KPI2 forecast/actual energy % for the whole fleet during a month in the summer season.
Sustainability 16 08017 g012
Table 1. Exogenous variables list.
Table 1. Exogenous variables list.
KPIDescription
BESS State of Charge -SOC- (%)Percentage that indicates relative storage capacity
Charge (kWh)Energy used to charge the battery
Consumption (kWh)Energy consumption on the site
Consumption Discharge (kWh)Energy from BESS discharge is used instantaneously for consumption
Discharge (kWh)Energy discharged from the battery
Grid Export (kWh)Energy exported to the grid
PV Charge (kWh)Energy discharged from battery energy storage systems (BESSs) is employed immediately for consumption
PV Consumption (kWh)Instantaneous utilisation of energy from a solar photovoltaic (PV) system for immediate consumption
PV Export (kWh)Instantaneous utilization of energy from a solar photovoltaic (PV) system for immediate consumption
Grid Charge (kWh)Energy for battery energy storage system (BESS) charge that is supplied instantaneously by grid import
Grid Consumption (kWh)Energy required for the charge of a battery energy storage system (BESS) originating from instantaneous grid import
Grid Discharge (kWh)Energy required for charging the battery energy storage system (BESS) that is instantly supplied by grid import
Precipitation (mm)Precipitation quantity
Precipitation probability (%)Likelihood of precipitation occurring
Solar radiation (J/cm2)Energy density or the total energy delivered per unit area
Sunshine duration (minutes)Amount of time that the sun is visible in a specific location. This measurement is calculated by recording the periods of direct sunlight and is often used as a proxy for solar radiation
Wind direction (°)Wind direction is measured in degrees: 0° is north, 90° is east, 270° is west
Wind speed (knots)Speed of the wind: 1 knot = 1.852 km/h
Table 2. Validation metrics of half-hourly granularity level models.
Table 2. Validation metrics of half-hourly granularity level models.
XGBMLP-NN
RMSE0.5660.497
MSE0.3200.247
MAE0.3430.280
R20.4710.591
Table 3. Residual distribution of half-hourly granularity level models for the whole fleet.
Table 3. Residual distribution of half-hourly granularity level models for the whole fleet.
Residuals (kW)XGBMLP-NN
Min0.0000.000
Q10.0170.029
Median0.0350.061
Q30.0580.111
Max0.5900.914
Table 4. Discretised residual distribution of KPI1 for the whole fleet.
Table 4. Discretised residual distribution of KPI1 for the whole fleet.
SizeCondition
SMALLresiduals ≤ 0.029 kW
MEDIUMresiduals > 0.029 kW and residuals < 0.08 kW
BIGresiduals ≥ 0.08 kW
Table 5. Residual distribution of half-hourly granularity level models for site 100.
Table 5. Residual distribution of half-hourly granularity level models for site 100.
Residuals (kW)XGBMLP-NN
Min0.0000.000
Q10.0790.082
Median0.1120.139
Q30.1920.346
Max4.0063.957
Table 6. KPI2 Levels.
Table 6. KPI2 Levels.
KPI2%
Min0.157
Q13.616
Median4.331
Q35.052
Max491.557
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.

Share and Cite

MDPI and ACS Style

Rozas-Rodriguez, W.; Pastor-Vargas, R.; Peacock, A.D.; Kane, D.; Carpio-Ibañez, J. BESS Reserve Optimisation in Energy Communities. Sustainability 2024, 16, 8017. https://doi.org/10.3390/su16188017

AMA Style

Rozas-Rodriguez W, Pastor-Vargas R, Peacock AD, Kane D, Carpio-Ibañez J. BESS Reserve Optimisation in Energy Communities. Sustainability. 2024; 16(18):8017. https://doi.org/10.3390/su16188017

Chicago/Turabian Style

Rozas-Rodriguez, Wolfram, Rafael Pastor-Vargas, Andrew D. Peacock, David Kane, and José Carpio-Ibañez. 2024. "BESS Reserve Optimisation in Energy Communities" Sustainability 16, no. 18: 8017. https://doi.org/10.3390/su16188017

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop