Forecasts are very rarely produced for their own sake, and are vital for the optimal performance of a number of applications. This chapter summarises a few such applications as well as some adjacent areas which will use some of the similar techniques and methods presented in this book. The main focus will be for battery storage control which is presented in detail in the following section.
15.1 Battery Storage Control

Illustration of how forecasts (black line) are used in storage control. The final demand on the network (shaded) is created by charging the battery when the forecast estimates low demand and discharging when the forecast estimates high demand
One popular form of storage are battery energy storage systems (BESS). Although BESS have traditionally been an expensive solution, the rapid reduction in cost in recent years is beginning to make them competitive with traditional reinforcement such as replacing existing assets or demand side response (Sect. 15.2). BESS can be deployed for a wide variety of network solutions including, demand smoothing, voltage control, and phase balancing. In this chapter, the primary focus will be on the application of peak demand reduction for the purposes of increasing the network headroom and maintaining the thermal capacity of the network (Sect. 2.2).
Forecasts are used to estimate the distribution of demand throughout the day, in particular the magnitude and timing of the peaks and troughs (the maximums and minimums). This can be utilised into a control algorithm so that the storage device knows the most appropriate times to discharge (at the peaks) and charge (during the troughs). An illustration of the charging and discharging of a storage device is shown in Fig. 15.1. The ‘Final demand’ in the plot is the resulting demand on the grid and is a supposition of the original demand and the charging/discharing of the device at periods of relatively low/high demand.
This process is not as easy as it appears. The demand being considered here is at the low voltage which is much more volatile than higher voltage (HV) and system level (e.g. country wide) demand. Low voltage feeders typically consist of around 40 households and hence have higher degrees of uncertainty than HV systems (see the Case Study in Chap. 14 for a detailed analysis of 100 LV feeders). In particular, an inaccurate forecast may cause a storage device to charge during a high demand period causing an increasing in the peak.
In this section, the peak demand application is based on the results from a previous publication by one of the authors and can be found in [1]. Note that some elements have been simplified to maintain the focus on the impact of forecasts rather than diving into the details of control theory! In the following sections several forecasting methods are developed and then incorporated into a control algorithm which simulates a BESS.
Although a basic control method is considered in this book, more advanced control methods such as Optimal Control, Model Predictive Control (MPC), and Stochastic Model Predictive Control (SMPC) could also be considered which can more optimally solve the peak reduction problem.
15.1.1 Data
Summary features for the feeders considered for the analysis in this chapter. This includes average half hourly demand, standard deviation of demand, and the maximum recorded half-hourly demand (measured over a year). All values are in kWh. Reprinted from [1] with permission from Springer
Feeder | Mean demand | STD | Max demand |
|---|---|---|---|
S1 | 7.57 | 3.32 | 36.20 |
S2 | 5.42 | 2.89 | 30.00 |
S3 | 11.15 | 5.86 | 42.14 |
M1 | 11.11 | 6.05 | 64.65 |
M2 | 16.43 | 11.14 | 63.60 |
M3 | 21.58 | 9.40 | 111.50 |
L1 | 30.97 | 14.43 | 204.00 |
L2 | 37.13 | 18.04 | 205.15 |
L3 | 24.26 | 9.74 | 110.00 |
The monitored data for the selected feeders consists of half hourly energy demand (kWh) for the period from 10th March 2014 to 15th November 2015. The two-week period, from 1st to 14th of November 2015, is used as a test period for assessing the storage control algorithms with the remaining data used for parameter selection (via cross-validation) and training of the forecast models.
15.1.2 Forecast Methods
This section describes several methods used for the load forecasts made up of a mix of machine learning (Chap. 10) and statistical methods (Chap. 9). Throughout this application $L_1, L_2, \ldots ,$ will denote the monitored demand time series with $L_t$ the demand at time step t, with the predicted value at the same time step denoted $\hat{L}_t$. Let $t=N$ be the last observed time step, and hence the forecast value at the forecast horizon h will be given by $\hat{L}_{N+h}$.
The forecasts will generate half hourly forecasts for the next two days starting at midnight prior to the first day. Since the data is the same as in the Case Study in Chap. 14 the same data analysis is relevant here and some of the same models are included. This also helps identify some of the inputs to include in the models such as daily and weekly seasonalities, and autoregressive features.
Method 1: Linear Seasonal Trend Model (ST) The first forecast method is based on the simple seasonal model (ST) presented in Sect. 14.2.3 consisting of annual seasonal terms, and linear trend for different half hours of the day. This generates a mean model forecast, $\mu _t$. This method is labelled ST.
Load from the past day. The past $H=48$ available demand values (a day) $L_N,L_{N-1}, \ldots , L_{N-47}$. This means that for further ahead forecasts the historical input data is less recent than for those for shorter horizons.
Load from past weeks. The load at the same time of the week for the past four weeks, i.e. the inputs $L_{N+h-n_w}, L_{N+h-2n_w}, L_{N+h-3n_w}, L_{N+h-4n_w}$ where $n_w =336$, the number of timesteps in a week for half-hourly resolution data.
Time of the day. This is defined as an integer between 1 and H. I.e. the half hour period of the day.
In total there are therefore $48+4+1 = 53$ input features per half hour in the horizon. Note that this means there is a different forecast model for each period in the horizon and a different model for each feeder to be trained. That equates to $96*9=864$ models to train for a two day ahead forecast for nine feeders. Thus it would be desirable to keep the computational cost low if possible.
The number of trees in the ensemble is an important parameter and must be tuned to its optimal value via cross-validation. To select the optimal number of trees in the random forest, a validation period of one week prior to the test period is used. Ensembles with varying number of trees from 5 to 100 in increments of 5 are considered. A value of 30 trees in the ensemble of a Random Forest was found to be sufficient trade-off between forecasting accuracy and performance, since smaller trees are less computationally expensive.
To train the final forecasts, the Random Forest is trained using the one year prior to the test period, 1st November 2014 to 31st October 2015.
As with the RFR model, hyperparameter selection is performed using the week prior to the test-period as a validation period. The linear kernel is chosen since it outperforms both the RBF and the polynomial kernels for all values of the C parameters. With the linear kernel, large values of $C > 20$ seem to reduce the model accuracy (in terms of MAPE) and so the regularisation constant is fixed at $C = 1$ for all feeders.
Since the Support Vector Regression forecast is more computationally intensive than the Random Forest Regression, a shorter training period of eight weeks prior to the test period, i.e. 5th September 2015 to 31st October 2015, is used.
Benchmark Methods Informative benchmarks are also included to compare with the more sophisticated models (Sect. 9.1). They can also help to understand the factors which best drive the forecast accuracy and the storage control performance. Further, because they are computationally inexpensive, if they perform well, they will scale up well and there is no need to implement more intensive methods.
15.1.3 Analysis of Forecasts
MAPE for day ahead forecasts for each of the methods described in the main text. The best score for each feeder is highlighted in bold. Also shown is the average score for each method. Reprinted [1] with permission from Springer
Feeder | Methods | |||||
|---|---|---|---|---|---|---|
SALW | 7SAV | ST | STAR | RFR | SVR | |
S1 | 20.20 | 15.54 | 15.29 | 14.98 | 17.41 | 16.53 |
S2 | 34.72 | 26.81 | 29.15 | 28.28 | 38.86 | 26.75 |
S3 | 24.49 | 18.97 | 17.49 | 17.57 | 25.20 | 21.06 |
M1 | 21.11 | 14.78 | 15.94 | 13.69 | 16.73 | 14.98 |
M2 | 27.92 | 25.69 | 29.02 | 24.33 | 33.03 | 38.43 |
M3 | 17.77 | 13.58 | 13.98 | 12.76 | 16.32 | 13.87 |
L1 | 15.04 | 11.30 | 10.71 | 10.13 | 14.81 | 12.18 |
L2 | 30.86 | 10.76 | 13.75 | 11.22 | 12.83 | 11.33 |
L3 | 18.63 | 15.37 | 17.48 | 14.62 | 22.79 | 19.33 |
Average | 23.42 | 16.98 | 18.09 | 16.40 | 22.01 | 19.38 |

Plot of Forecast errors for each feeder against a Average daily demand on for STAR and ST methods, and b scaled standard deviation for the STAR method. Also highlighted is feeder M2 (red square) and the S2 feeder (blue square)

Day Ahead forecasts (orange) using STAR method for the Small feeders for first four days of test data. Also shown are the actuals (black)

Day Ahead forecasts (orange) using STAR method for the Medium feeders for first four days of test data. Also shown are the actuals (black)

Day Ahead forecasts (orange) using STAR method for the Large feeders for first four days of test data. Also shown are the actuals (black)
Finally, Fig. 15.5 shows the day ahead STAR forecasts and actual demand for the largest feeders. The forecasts once again seem to produce good estimates of the daily demand of the feeders. Feeder L2 looks like it is a feeder connected to many or one large business. In addition to the large daily demand (and no demand during morning or evenings) the first day (a Sunday) has zero demand suggesting this is a single commercial consumer with no operation on the weekend. This large demand will mean that the storage device will likely not be able to significantly reduce the peak. L1 looks very accurately estimated and in fact has the smallest MAPE on average (Table 15.2). This feeder has a major singular peak which seems to regularly occur in the evening, and therefore there could be significant peak reduction on this feeder. Finally, L3 has not got a prominent peak on most days and but seems to have two peaks on most days, one in the morning and one in the evening. A relatively large peak reduction may not be possible for this feeder if the battery cannot recharge quick enough to reduce the second peak after reducing the first peak.
15.1.4 Application of Forecasts in Energy Storage Control
The effectiveness of a storage device at reducing daily peak demands depends on the specifications of the battery, namely it’s capacity (how much energy it can store), its ratings (how fast it can charge and discharge), and its age (batteries become less effective the more they are used, but also how they are used, e.g. performing many cycles of charging to full and emptying completely). For other applications other criteria such as location on a feeder, whether there is real-time control etc. can also be important. The BESS will be sized so that theoretically a peak demand reduction of $20\%$ can be achieved. The aim is to see what the effect of future demand uncertainty has on the performance, and what part forecast accuracy plays. The ratings and capacity ranges used in this experiment will change for each day in the test set, but obviously in a real world example it would be fixed and could be sized by analysing historical behaviour. The required rating will depend on how high the peak is over any half hour, the higher it is the faster a battery would need to discharge to be able to reduce it. The relative capacity is also related to the size of the peak, but if there are large demands during periods adjacent to the peak then these will also have to be reduced in order to decrease the overall daily peak (This is the case with feeders M1 and L2 as seen in Figs. 15.5 and 15.4 respectively). This will require a larger capacity to reach a particular percentage peak reduction. In general the bigger the demand on a feeder the bigger the capacity required.
Forecasts are used as estimates of the future demand, and the battery control algorithm will assume these are true estimates in order to develop a schedule which maximises the peak reduction. The schedule will be developed at midnight prior to the day of interest. Further another aim is to have the BESS with $50\%$ state-of-charge at the midnight so it is prepared for any early peaks the following day.
The control method presented here uses fixed day-ahead scheduling. As input it uses the forecasts to decide on the periods of charging and discharging subject to the constraints above. Let $\textbf{P} = (P_1, P_2, \ldots , P_{48})^T$ be the charging schedule and let $\hat{\textbf{L}} =(\hat{L}_{N+1}, \hat{L}_{N+2}, \ldots , \hat{L}_{N+48})^T$ be the predicted demand (both in kW) for the day ahead.
15.1.5 Results
The overall peak reduction by applying a storage control to each feeder for each day-ahead forecast. The best results for each feeder are highlighted in bold. Reprinted from [1] with permission from Springer
Feeder | Best | SALW | 7SAV5 | ST | STAR | RFR | SVR | Av |
|---|---|---|---|---|---|---|---|---|
S1 | 19.36 | 0.75 | 0.83 | 2 | 2 | 1.86 | 1.56 | 1.5 |
S2 | 18.83 | 0.44 | 2.41 | 5.09 | 4.84 | 2.63 | 3.34 | 3.13 |
S3 | 19.91 | 3.03 | 5.39 | 7.86 | 7.92 | 4.65 | 7.34 | 6.03 |
M1 | 18.75 | 2.42 | 2.03 | 4.28 | 3.76 | 4.15 | 2.36 | 3.17 |
M2 | 19.41 | 2.35 | 4.56 | 1.8 | 3.95 | 1.37 | 4.24 | 3.05 |
M3 | 19.76 | 7.57 | 10.14 | 10.56 | 10.43 | 6.8 | 10.5 | 9.33 |
L1 | 19.12 | 7.91 | 7.74 | 12.23 | 11.16 | 11.37 | 9.7 | 10.02 |
L2 | 13.68 | 1.94 | 1.12 | 1.12 | 2.75 | 3.22 | 0.25 | 1.73 |
L3 | 19.49 | 6.02 | 7.89 | 8.36 | 9.1 | 6.04 | 8.97 | 7.73 |
Ave. | 18.7 | 3.60 | 4.68 | 5.92 | 6.21 | 4.68 | 5.36 | 5.08 |

Plot of percentage peak reduction for each feeder against a Average daily demand on for STAR and ST methods, and b MAPE for STAR method. Also highlighted is feeder S2 (blue square) and M2 (red square)
The last column of the table shows the average peak reduction across all forecasts (and doesn’t include the “Best”). It shows that although there is a trend of better peak reduction for larger feeders it isn’t straight forward. This is despite the correlation between accuracy and feeder size (see Fig. 15.2). Figure 15.6a shows the percentage peak reduction against feeder size for the ST and STAR methods. In this case there is a trend, with lower peak reduction with larger feeder size, but there is at least one outlier with large demand but small peak reduction. This is feeder L2, which as shown in Fig. 15.5, appears to be a single commercial load with no operation on Saturday and Sunday. Not only does this mean peak reduction is not possible on the two weekend days each week, but the other five days have large continuous daytime demands which mean peak reductions are difficult. To reduce the daily peak demand on this network requires a much larger storage device which can discharge a lot of demand over a larger portion of the day.
Figure 15.6b shows the peak reduction for each feeder against the MAPE for the STAR method. In general the more accurate the forecast (the smaller the MAPE) the bigger the percentage peak reduction. However there are three feeders which do not fit the trend. One of these is L2 which has already been discussed. The others are S1 and M1. In fact M1 (Fig. 15.4) has lower peak reduction due to some of the similar demand features as L2. Again the demand is relatively large throughout the day, possibly due to several commercial consumers connected to this feeder. The low peak reduction for S1 is more difficult to explain but there is large demands in the morning on some days (Fig. 15.3) which may reduce the energy available in the battery for reducing the evening peak.
Highlighted in Fig. 15.6b is the feeders S2 and M2 which you may recall have relatively large standard deviation (Fig. 15.2). These have relatively large MAPE and also have small peak reduction. The volatility of these forecasts mean that the data is relatively spikey and thus makes it difficult to provide an accurate forecast. A storage control schedule based on the forecast may inadvertently charge during higher charge periods or discharge in relatively lower periods. Therefore these feeders only have small peak reductions.
It should be noted that there are only nine points in these plots. Thus there should be some caution with being over interpreting the results and they may not generalise more widely.
A take home message from these results is that there is no one-size-fits all method. A next step may be to consider taking simple averages of the forecasts to see if this improves things (Sect. 13.1). In addition, since the data is quite volatile, probabilistic forecasts may also be a good option (Chap. 11). They may help to improve the results for the more volatile feeders. In addition, there are more advanced control techniques out there such as model predictive control which could also be considered.
15.2 Estimating Effects of Interventions and Demand Side Response
Demand side response (DSR) is deployed by turning on or off demands to react to possible strains on the network or to ensure energy supply matches energy demand. DSR could be as simple as turning on a load to increase the demand or, more commonly, turning off devices to reduce the demand on the network. For example, heat pumps could be turned off to reduce the demand during peak hours. Over a short period of time such interventions may not have a significant impact on the heating comfort within a home since, unless the home is not well-insulated, the temperature should not drop too rapidly.

Illustration of DSR turn down. The measured demand (shaded) is compared to an estimate without intervention (bold line). The comparison can be used to estimate the energy saved by turning off devices
Figure 15.7 shows both the actual demand after demand side response (shaded), and what the demand would have been had no intervention been applied (bold line). The shaded area is the adjusted demand created by the ‘turn-down’ event, for example by turning off the controllable appliance. The energy saved at 6PM is the difference in the area between the shaded part and the line. Of course, there is no way to know what the demand would have been had there been no DSR which means the consumer has no way of knowing how much energy they saved. In particular, if they are participating in any energy market schemes, they will not know how much payback they may have received.
Forecasting is an effective way to estimate the amount of turn-down since a model trained on “typical” demand can estimate what the demand would have been in the absense of an intervention (as long as the historical data used for training does not include interventions either). Thus the turn-down is simply the difference between the recorded demand (where the intervention has been applied) and the estimated demand from the forecast model.
The estimate in Fig. 15.7 could be estimated using the time series methods introduced in this book. Of course there will be natural variation in the demand but if the forecast is reasonably accurate (and this should be tested of course) then accurate estimates of average turn-down can be produced. Notice that the example in the figure has a much larger demand than expected after the turn down period. This can occur in some applications, and is known as a ‘rebound’ effect caused by adjusted behaviour, or extra demand in order to recover from the turn down. For example, this could be extra heating applied by the occupants to recover the comfort levels in the home after the DSR event.
Notice that the model can be trained using demand data from after the DSR event since the application is in fact a backcast rather than a forecast and the aim is to estimate, not predict, the demand. This means the estimates may in fact be more accurate than a normal forecast since more information is available.
15.3 Anomaly Detection
Chapter 6 already discussed ways to identify anomalous data. However, similar techniques can be used to identify anomalous behaviour rather than errors in the recorded data. This is important to identify things like energy theft, or whether the security of supply to vulnerable customers, with for example medical needs, are at risk (although privacy concerns would have to be considered for such applications).
Such anomalies can be detected if they deviate from the expected demand, and of course models used to create forecasts can be used to estimate typical demand, or model the uncertainty. One example would be to develop point forecast models to estimate the daily demand which can be used to identify unusually large demands or appliances. Load forecasts can also be used to identify unusually small demand. This could indicate the monitoring is broken, or that someone is rerouting their usage to artificially lower their bills! Another example would be to use probabilistic forecasts (Chap. 11), e.g. Quantile forecasts, to identify observations which lie in the extreme outliers. Large numbers of these variables can suggest something unusual is occurring.
Sudden large increases in the forecast errors also may suggest sudden changes in behaviour. This could suggest new occupants, new technologies, or simply large behavioural changes (for example the covid pandemic has led to many individuals working from home). This information could, in turn, lead to new solutions to support the network or help network operators plan their infrastructure upgrades.
15.4 Other Applications
Further Battery Applications: Forecasts can also be used to optimise solar PV connected batteries, minimise curtailment loss, control multiple batteries in electric vehicles, and regulate voltage.
Network Design and Planning: Forecasts can be used to size assets on the network (capacitors, substations etc.), and also plan the networks themselves (topology, location of batteries, sectionalising switches, etc.).
Electricity Price Forecasts: Energy markets rely on the estimated future demand, and therefore can be valuable inputs to price forecasting algorithms.
Simulating Inputs and Missing Data: Instead of the simple imputation models given in Sect. 6.1.2, more sophisticated load forecast models could be used. Forecasts can also be used to simulate inputs for other applications, for example power-flow analysis.
There are many other low voltage applications for load forecasts and these can be found in the review paper [2].
15.5 How to Use Forecasts in Applications
Try to understand what features may be most important for the performance of the application and try to design the error measure so it represents or aligns with this.
Remember: whatever error measure is used it will not exactly correlate with the the performance of the application (unless you use the associated application cost function for the assessment—which is not often practical).
Design the forecasts with the application and practicality in mind. If there is high levels of volatility then perhaps probabilistic forecasts are more appropriate. However, if there is limited data, or limited computational resources, this may not be possible and point forecasts may be more appropriate.
In the case were probabilistic forecasts seem appropriate, it may be worth considering point forecasts anyway since the performance difference may be minimal and the savings in resources may be worth the drop in optimality.
Use at least one benchmark forecast but preferably several to help investigate the performance of the main models.
Try to understand how forecast accuracy relates to performance within the application. If there is a trend, is it dramatic or small? Possibly drops in accuracy do not correspond to a large drop in performance. In which case simpler methods may be appropriate, and there is not much point in spending time perfecting the forecast models. In contrast, if small improvements in forecast accuracy create large performance changes (or large monetary savings) then perhaps a focus on small improvements to the forecast is worth the effort (at least until there is diminishing returns to this effort).
It is worth remembering that in-silico tests are limited as there will often be a whole host of other complications and challenges when applying the methods in practice. For example, to control a storage device will require reliable communications equipment, properly functioning power-electronics, and may involve lags and delays in processing etc. Ideally many of these considerations should be included in the design of the algorithms but there will always be some simplifications.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.