Predicting Peak Day and Peak Hour of Electricity Demand With Ensemble Machine Learning
Predicting Peak Day and Peak Hour of Electricity Demand With Ensemble Machine Learning
Abstract
Battery energy storage systems can be used for peak demand reduction in power sys-
arXiv:2203.13886v1 [cs.LG] 25 Mar 2022
tems, leading to significant economic benefits. Two practical challenges are 1) ac-
curately determining the peak load days and hours and 2) quantifying and reducing
uncertainties associated with the forecast in probabilistic risk measures for dispatch
generate 1) the probability of the next operation day containing the peak hour of the
month and 2) the probability of an hour to be the peak hour of the day. Guidance
the Duke Energy Progress system and successfully captures 69 peak days out of 72
testing months with a 3% exceedance probability threshold. On 90% of the peak days,
the actual peak hour is among the 2 hours with the highest probabilities.
Keywords: Batteries, electricity demand, energy storage, ensemble machine learning,
load forecast.
∗
Corresponding author.
Email address: [email protected] (Di Wu)
Many cooperatives, municipally owned utilities, and other types of load serving
entities (LSE) purchase power from electricity markets or through power purchase con-
tracts. A capacity charge is paid based on the coincident demand during system peak
hours. Effectively reducing the peak demand leads to significant economic benefits.
Battery energy storage systems (BESS) are promising for peak demand reduction be-
cause of their flexibility and instantaneous response capability. An LSE does not know
exactly when the peak hour will occur. Simply discharging BESS on all high-load days
helps capture the peak hour and reduce the coincident demand, but causes unnecessary
tion, due to limited energy capacity, BESS may not be able to discharge at the rated
power in all high-load hours. Therefore, advanced peak day and peak hour forecast
methods are critical to maximizing benefits from BESS for peak demand reduction.
Predictions of the monthly peak hour can be derived from load forecast that spans
the entire month. Traditional methods, such as autoregressive integrated moving av-
erage (ARIMA), forecast load with univariate historical load. More advanced non-
linear machine learning (ML) methods have also been proposed for load forecasting
with multivariate predictors, including weather, calendar, and economics (Hong & Fan,
(El-Attar, Goulermas & Wu, 2009), fuzzy regression models (Hong & Wang, 2014),
support vector machine (SVM) (Niu, Wang & Wu, 2010), gradient boosting machine
(GBM) (Massaoudi, Refaat, Chihi, Trabelsi, Oueslati & Abu-Rub, 2021), random for-
est (RF) (Cheng, Chan & Qiu, 2012; Huang, Lu & Xu, 2016), and artificial neural net-
works (ANN) (El Desouky & Elkateb, 2000; Ringwood, Bofelli & Murray, 2001; Saini,
2008). These approaches can also be combined to improve load forecasting. For ex-
ample, El Desouky & Elkateb (2000) developed a hybrid ANN with ARIMA for load
monthly peak hour can be identified based on the value of the hourly load forecast. Such
a method requires the hourly load forecast toward the end of the month. There are sig-
nificant uncertainties associated with long-term hourly load forecast. A major challenge
of predicting peak hours based on load forecast is how to model and quantify uncer-
2
tainties, considering varying weather conditions (e.g., temperature, humidity, and wind
speed) and nonlinear relationships between weather and load (El Desouky & Elkateb,
2000).
Efforts have also been made to directly predict peak hours. For example,
Goodwin & Yazidi (2016) proposed an SVM and Gaussian mixture classification ap-
proach to directly estimate the peak hours for the next 7 days based on historical
load. Leveraging short-term load forecasts, Jiang, Levman, Golab & Nathwani (2014)
adopted a probabilistic approach for estimating the probability of the next day con-
taining the highest hourly demand of a year. A Naive Bayesian classification model
was proposed for classifying whether an hour is a 5CP (top 5 coincident peaks of a
year) hour (Ryu, Makanju, Lasek, An & Cercone, 2016). Liu & Brown (2019a) pro-
ahead whether a day is a 5CP day. For the peak hour model, they built separate
models for summer and winter using different classification methods: Naive Bayes,
SVM, RF, AdaBoost, CNN, long short-term memory (LSTM), and stacked autoen-
coder (Liu & Brown, 2019b). More recently, Saxena, Aponte & McConky (2019) de-
veloped a hybrid classification model combining ARIMA, logistic regression (LR), and
Both load forecast and direct peak prediction ML models require enough data for
training and validation. In practice, however, complete historical records of load and
weather are not always available, which warrants the data augmentation effort. In
factors or skipped dimension reduction and physical interpretation of the factor con-
tributions. To summarize, despite the progress to date, additional research and devel-
opment are needed to better support BESS dispatch decision-making for peak demand
reduction, including 1) quantifying uncertainties associated with peak day and peak
hour predictions, 2) addressing the data inadequacy issue via ML data augmentation,
both prediction accuracy and precision, 4) including all physical and temporal factors
to fully capture their correlations and causalities with system load peaking behaviors,
e.g., trailing and leading effects, and 5) integrating ensemble ML model selection tech-
niques to deal with factor collinearity, mixed data types, and overfitting, as well as
3
trustworthy, explainable ML prediction.
tiple ML techniques, including RF, GBM, and LR, for predicting peak day and peak
hour to better support BESS dispatch decision-making. To quantify the prediction un-
the probability of the next day to be the monthly peak day, and the probability of an
hour to be the peak hour of a day. The proposed approach also features ML-based
data augmentation to address the data inadequacy issues and a procedure to select
including actual load in previous days of the month, day-ahead load forecast, weather
forecast, and their derivatives, as well as temporal factors to help improve peak pre-
method can help avoid overfitting and deal with unbalanced data of mixed types,
e.g., categorical vs. continuous (Domingos, 2012; Cieslak & Chawla, 2008; Breiman,
2001; Jaiswal & Samikannu, 2017; Friedman, 2001). We also use naive load-based
framework.
2. Dataset
The proposed ML-based prediction framework is generic and can be applied to any
system. The Duke Energy Progress (DEP) system is used for illustration and analysis
presented in this paper. The input dataset includes historical load and weather data,
The DEP system consists of two balancing authorities: DEP East and DEP West.
The data are obtained from the Energy Information Administration (EIA, 2021), in-
cluding both day-ahead forecasts and actual demand with an hourly resolution. Com-
plete records are only available for about 6 years starting from July 2015. Data aug-
mentation is proposed and used to generate 21 years of data for training and testing
4
16000
14000
10000
8000
6000
Mar
Apr
Sep
Oct
Dec
Nov
Jan
Jun
Jul
Feb
May
Aug
Fig. 1: Boxplot of monthly peak load from July 2015 to December 2020.
14000
Load (MWh)
12000
10000
8000
6000
4000
16000
2015 2016 2017 2018 2019 2020
14000
Load (MWh)
12000
10000
8000
6000
4000
A boxplot of monthly peak load is provided in Fig. 1. As can be seen, the highest
monthly peak loads typically occur in mid-winter (e.g., January) and mid-summer
(e.g., July). Fig. 2 plots the system load vs. time for January and July. The peak
day can occur at the beginning, in the middle, or at the end of a month, and there is
no obvious pattern, which increases the difficulty for peak day prediction. The peak
days in January exhibit strong variations over the years yet no dominant timings and
5
0.6 Jan 0.6 Feb 0.6 Mar 0.6 Apr
0.5 0.5 0.5 0.5
Probability
Probability
Probability
Probability
0.4 0.4 0.4 0.4
0.3 0.3 0.3 0.3
0.2 0.2 0.2 0.2
0.1 0.1 0.1 0.1
0.0 0.0 0.0 0.0
0 4 8 13 19 0 4 8 13 19 0 4 8 13 19 0 4 8 13 19
Hour Hour Hour Hour
0.6 May 0.6 Jun 0.6 Jul 0.6 Aug
0.5 0.5 0.5 0.5
Probability
Probability
Probability
Probability
0.4 0.4 0.4 0.4
0.3 0.3 0.3 0.3
0.2 0.2 0.2 0.2
0.1 0.1 0.1 0.1
0.0 0.0 0.0 0.0
0 4 8 13 19 0 4 8 13 19 0 4 8 13 19 0 4 8 13 19
Hour Hour Hour Hour
0.6 Sep 0.6 Oct 0.6 Nov 0.6 Dec
0.5 0.5 0.5 0.5
Probability
Probability
Probability
Probability
0.4 0.4 0.4 0.4
0.3 0.3 0.3 0.3
0.2 0.2 0.2 0.2
0.1 0.1 0.1 0.1
0.0 0.0 0.0 0.0
0 4 8 13 19 0 4 8 13 19 0 4 8 13 19 0 4 8 13 19
Hour Hour Hour Hour
Fig. 3: Distribution of daily peak hour by month from July 2015 to December 2020.
Fig. 3 shows the varying distributions of peak hours by month from July 2015 to
December 2020. In January and February, a majority of peak hours occurred at 8 a.m.
In March, November, and December, the peak hours had a bimodal distribution with
one peak in the morning hours and the other peak in the evening hours. In April and
October, the peak hours happened in the later evening, hour 21 for April and hour
20 for October. From May to September, a majority of peak hours were in the early
The weather datasets are obtained from the National Oceanic and Atmospheric
Administration website (NOAA, 2021). In this study, the weather data at the Raleigh
weather station are used as it is the closest weather station to the city of Raleigh, which
is the geographic center of DEP and the second biggest city in North Carolina. The raw
weather data include dry-bulb air temperature, dew point temperature, wind speed,
and visibility, with temporal resolutions between 15 minutes to an hour from 2000 to
2020. To match the temporal resolution and coverage of the load data, the weather
data are mapped to the nearest exact hours to generate hourly data. In addition, the
6
40
30
Temperature (°C)
20
10
−10
Max Temp Min Temp
−20
(a) January
40
30
Temperature (°C)
20
10
−10
Max Temp Min Temp
−20
(b) July
Fig. 4: Daily peak load vs. daily maximum and minimum temperature.
Table 1: R-squared of daily peak load vs. daily minimum and maximum temperature.
Jan. Feb. Mar. Apr. May June July Aug. Sept. Oct. Nov. Dec.
T min 0.86 0.72 0.58 0.04 0.57 0.39 0.30 0.33 0.36 0.38 0.40 0.74
T max 0.58 0.50 0.29 0.11 0.80 0.80 0.73 0.77 0.77 0.50 0.26 0.56
17.625 × DT 17.625 × T
H = exp − × 100% , (1)
243.04 + DT 243.04 + T
where T is the dry-bulb air temperature (℃), DT is the dew point temperature (℃),
3. Methodology
There is a strong and nonlinear correspondence between power system load and
weather (Sobhani, Hong & Martin, 2020). Fig. 4 plots the DEP daily peak load vs.
7
Table 2: Predictors for the peak day model.
Predictor Description
load max Maximum load from the day-ahead forecast
T min* Minimum temperature from the day-ahead forecast
T max* Maximum temperature from the day-ahead forecast
weekdayIdx 0 or 1 indicating whether the next day is weekday or weekend
prev month max Maximum actual load of the month to date
prev MAX Maximum actual load on previous day
T min day 2 to 7* Minimum forecast temperature within the next 2 to 7 days
T max day 2 to 7* Maximum forecast temperature within the next 2 to 7 days
minimum and maximum temperature on each day in January and July from July
2015 to December 2020. The R-squared values between the daily minimum/maximum
temperatures and the daily peak load for all months are listed in Table 1. Two key
• There is a strong negative correlation (with R2 > 0.7) between the daily minimum
positive correlation between the daily maximum temperature and load in summer
• The correlation between daily peak load and daily minimum and maximum tem-
perature is relatively weak (R2 ≤ 0.5) in spring and fall (March, April, May,
October, and November), which suggests that temperature is a less effective pre-
Based on these observations, both direct and indirect models are developed and
tested in this study. The selected predictors are the same for both models, includ-
ing load and weather variables that are derived from the hourly data and a week-
forecast data, actual weather data are used for the ML model development.
• The direct model directly predicts whether the next day is the peak day of the
month. In this model, a binary response variable takes a value of 1 if a day is the
monthly peak day and 0 otherwise. Ideally, the predictors should also include
the load and weather forecast toward the end of the month to better capture how
future load may affect whether the next day is the peak day. However, long-term
load and weather forecasts are generally unavailable and therefore only forecasts
8
of up to 7 days are used as predictors. As a result, the direct model actually links
• The indirect model outputs the probability of the next day to be the up-to-
date peak day, which is defined as the peak day of a time window starting from
the beginning of the month and ending at day 7 into the future or the end
of the month. Therefore, the model links predictors to the peak day indicator
at the exactly matched time window. Then, the obtained up-to-date peak day
applying a multiplier (Pmul ) that reflects the chance of the monthly peak day
examining the distribution of historical peak days. It is found that the chance is
other words, each day in a month has an equal probability to be the monthly
n+6
Pmul = min[1, ], (3)
N
where N is the number of days of the current month and n is the day of the month
for the next day. Unlike the direct model, which completely ignores the impacts
of the load beyond 7 days, the indirect model takes future load into account in a
stochastic manner.
The peak hour model is trained using the hourly load and weather data. The
response variable is a binary variable that indicates whether an hour is the peak hour
of the day. The predictors include both hourly load forecast and weather data for the
• For each hour t, we use not only the temperature and humidity for the hour, as
9
they directly impact the load components, e.g., heating and cooling, but also the
• Similarly, the forecast loads from hour t − 3 to t + 3 are included in the predictors
• The rank of load forecast for hour t is included to distinguish the peak hour from
• The maximums of load forecast before and after hour t are included to describe
the relative position of the load in hour t with respect to highs in the past and
future hours of the day. In comparison to load forecast of each hour beyond hours
and avoid overfitting, while effectively capturing the overall impacts of the other
• In addition, as adjacent days tend to have more similar peaking behaviors, at-
tributes from the previous day, including the rank of actual load for hour t, the
forecast, and the actual load for hour t, are also used as predictors.
3.2. ML models
Given the high dimensionality of the predictors and the expected non-linear rela-
and GBM, also to avoid overfitting and deal with unbalanced data of mixed types,
e.g., categorical vs. continuous. RF is a tree-based ensemble learning method that can
2001). RF constructs a number of ensemble trees, with each tree trained by a randomly
selected subset of input data using a bootstrap aggregating technique. At each node
of a tree, instead of choosing the best split among all predictors, a randomly sampled
subset of predictors is selected, and the best split is chosen from the subset predictors.
Each tree can grow to the maximum possible depth. For classification problems, the fi-
nal prediction is made by the majority votes from all the trees in the ensemble. RF has
10
Table 3: Predictors for the peak hour model.
Predictor Description
load forecast Forecast load for hour t
T* Forecast temperature for hour t
humidity* Forecast humidity at hour t
weekendIdx A binary indicator: 1 if the operating day is on a weekend,
and 0 otherwise
peak prev day A binary indicator: 1 if hour t is the peak hour on the
previous day, and 0 otherwise
T m 1* Forecast temperature for hour t − 1
T m 2* Forecast temperature for hour t − 2
T m 3* Forecast temperature for hour t − 3
T p 1* Forecast temperature for hour t + 1
T p 2* Forecast temperature for hour t + 2
T p 3* Forecast temperature for hour t + 3
load m 1 Forecast load for hour t − 1
load m 2 Forecast load for hour t − 2
load m 3 Forecast load for hour t − 3
load p 1 Forecast load for hour t + 1
load p 2 Forecast load for hour t + 2
load p 3 Forecast load for hour t + 3
prev max load Maximum forecast load from hour 0 to hour t − 1
after max load Maximum forecast load from hour t + 1 to 23
rank load forecast Rank of forecast load for hour t on the operation day
rank load prevDay Rank of actual load for hour t in on the previous day
load prevDay Actual load for hour t on the previous day
load prevDay forecast Forecast load for hour t on the previous day
in power systems include Lahouar & Slama (2015); Liu, Dong, Hou & Liu (2021). RF
models can be developed and optimized by refining key model configuration parameters
such as the number of trees and tree depths, in addition to bootstrap re-sampling of
11
RF, in which each tree is trained independently, GBM builds one tree at a time and
the newly-built tree is added to previous trees to improve the overall prediction. It
additive model that minimizes the loss function. The new tree at each step is fitted to
the residual of previous trees, and adding a new tree improves regions where previous
trees did not perform well. While the result of RF is voted by all the trees after the tree-
building process, the result of GBM is optimized throughout the tree-building process.
Compared to RF, GBM can be more computationally intensive and more sensitive to
set of predictors and a categorical response variable using a logistic function (sigmoid
continuous variables, and the output is the probability of the response variable being
one of the categorical outcomes. Because there are no “hyper-parameters” that can be
The raw load data are only available after July 2015, resulting in less than
80 monthly peak days. Separate models by month are highly desirable to better
is needed to generate sufficient data for model training and reliable testing. An
ANN model for day-ahead load forecast has been developed using load and weather
attributes(Berscheid, Makarov, Hou, Diao, Zhang, Samaan, Yuan & Zhou, 2018).
The developed model has been cross-validated with historical load and weather data
sets for major U.S. Balancing Authorities. In this study, using the DEP weather and
load data sets from July 2015 to December 2020, the developed ANN model was
trained to predict hourly load (including both actual load and day-ahead forecast) with
the following predictors: hour, temperatures for the current hour and the past 3 hours,
humidity at the hour, day of the week for the predicting day, and weekday/weekend
index. After a hyperparameter search, an optimized ANN model containing two layers
and 20 neurons was obtained to capture load patterns and the relationship between
load and weather embedded in the raw load data. Using the ANN model, we produced
12
hourly actual load and day-ahead hourly load forecast over a 15-year period with
domly selected for model testing: 2001, 2006, 2008, 2011, 2019, and 2020. The remain-
ing 15-year data are used for training. Note that the actual weather data are used for
the ML model development because of the lack of historical weather forecast data.
4. Results
Ensemble ML models, including LR, RF, and GBM, are developed for peak hour
predictions. For LR models, we use Akaike Information Criteria (Akaike, 1974) for
the model selection. For RF and GBM models, we evaluate the testing accuracy with
respect to two hyper-parameters: number of trees and tree depths. Fig. 5 shows the
training and testing accuracy with respect to different tree depths and different numbers
of trees for both January and July RF models. The selected number of depths are 5,
10, 20, 40, and 60, and the selected number of trees are: 50, 100, 200, 500, 1000,
and 2000. The results show that the testing accuracy converges when the tree depths
are greater than 20 for both models. For the January model, the testing accuracy is
comparable when the same number of depth is used regardless of the number of trees
used. For the July model, 1000 trees yield slightly higher accuracy than using other
For the peak hour models, each of the three ML ensembles is optimized with pa-
rameter search and cross-validation for reducing misfits and overfitting if possible. The
performance of the optimized final models is compared in terms of the overall accuracy
of capturing actual peak hours for each month in the 6 testing years. Overall, the RF
models outperform both the LR and GBM models by 2%, In six monthly models —
January, April, June, July, August, and September — the RF models perform better
than the other two models by 5% and 3%, respectively. LR models perform slightly
better in February, May, October, and December; while GBM models perform better
13
1.00
0.99
0.98
Accuracy
0.97
0.96
0.95
0.94
0 5 10 15 20 25 30 35 40 45 50 55 60
Depth
(a) January
1.00
0.99
0.98
Accuracy
0.97
0.96
0.95
0.94
0 5 10 15 20 25 30 35 40 45 50 55 60
Depth
(b) July
Fig. 5: Peak hour RF model hyper-parameter tuning for January and July.
in March and November. Because RF models perform the best overall, and in the
focus months of January and July in particular, they are selected for further peak hour
predictions and analyses. For the peak day prediction, RF models also perform bet-
ter than or similar to GBM models, and the LR models do not converge due to their
inability to handle imbalanced data sets. Thus, RF models are also selected for peak
day prediction to be consistent with the model choice for peak hour prediction.
Feature importance (Saarela & Jauhiainen, 2021), which can be directly calculated
from the RF model, measures the relative importance of each predictor in the fitted
model. Fig. 6 shows the ranked importance of the eight predictors in the January
and July peak day models. For the January model, T min (the minimum forecasted
temperature) and load max (the maximum forecasted load for the operation day) are
14
0.3 0.3
Feature importance
Feature importance
0.2 0.2
0.1 0.1
0.0 0.0
T_min
load_max
T_max
load_max
T_max
T_min
prev_month_max
T_min_day_2_to_7
prev_MAX
T_max_day_2_to_7
prev_month_max
prev_MAX
T_min_day_2_to_7
T_max_day_2_to_7
weekdayIdx
weekdayIdx
(a) January (b) July
Fig. 6: Feature importance of peak day models for January and July.
the most significant predictors, with almost identical factors and feature importance
values of 0.237 and 0.235, respectively. The other six variables are secondary. For
the July model, load max is more important than the other predictors. Load-related
For peak hour predictions, Fig. 7 shows the top-ranked 10 of the 23 predictors with
scaled importance in the January and July RF models. Rand load forecast (the rank
of the load forecast of each hour) is the dominant predictor for both models, and the
feature importance values are 0.362 and 0.207, respectively. Other import predictors
include the load forecast for the January model and the rank load of the previous
day for the July model. To better understand the importance of predictors, one can
refer to our principal component analysis and shrinkage discriminant analyses showing
A.
day/peak hour probabilities. However, in order to use such outputs for a typical BESS
dispatch decision-making, thresholds are needed for finalizing the peak days and peak
be less than 100 per year, and 2) the BESS can be charged/discharged up to 2 hours
15
0.4 0.4
Feature importance
Feature importance
0.3 0.3
0.2 0.2
0.1 0.1
load_p_1
load_m_3
after_max_load
T_p_3
load_m_3
Humidity
load_p_3
load_p_1
load_m_2
load_p_2
load_forecast
prev_max_load
load_forecast
rank_load_forecast
rank_load_forecast
rank_load_prevDay
rank_load_prevDay
(a) January (b) July
Fig. 7: Feature importance of peak hour models for January and July.
Table 4: Comparison of BESS operation cycles and peak days captured between monthly peak day
model and up-to-date peak day model.
per day. Given the first consideration, peak day prediction is set to be an exceedance
probability (e.g., 3%) as detailed below; and based on the second consideration, peak
hour prediction is the top 2 hours with the highest peak probabilities in the operation
day.
After the next operation day is assigned a peak probability by the RF model,
predicted peak day probability with a predefined threshold. The BESS would only be
operated if the predicted peak day probability is above the threshold. A starting value
of such a threshold is 3%, with the assumption that any day within a month could
be a peak day. As shown in Table 4, both the direct and modified peak day models
perform well in terms of the number of operation cycles and peak days captured per
16
Table 5: Comparison of predicted probabilities of actual peak days in 2020 between using the direct
and indirect peak day models.
year for the 6 testing years. The BESS would be operated for a similar number of
cycles on average, 67 and 76, which are much fewer than the maximum 100 cycles/year
requirement. The average numbers of captured peak days are 11.3 and 11.5 per year,
Table 5 shows the predicted peak day probabilities for each month in 2020 using the
direct and indirect peak day models. With 3% as the threshold, the direct peak day
models miss the peak days in April and October, while the indirect peak day models
only miss the peak day in September. As shown in Fig. 1, compared with the historical
peak loads, the maximum peak loads on April 8, 2020 (8324 MWh), and October 8,
2020 (8790 MWh), are at the lower end of the historical peak day loads, which causes
the direct models to assign a less than 1% probability to both days and miss them. In
comparison, the indirect models can still capture these days with assigned probabilities
of 3.8% and 8.6%, respectively. For the peak day on September 3, 2020, the predicted
peak day probability is only 2.9% from the indirect peak day model, although its peak
load of 13,027 MWh is higher than the median historical peak day loads. The reason
for such a low-probability estimate is because the neighboring days have comparable
high load and the forecast peak load on September 3, 2020 (12,251 MWh), is lower
than the actual peak load on September 2, 2020 (12,785 MWh), as shown in Fig. 8,
which shows the forecast and actual daily peak loads in September 2020.
17
14000
12000
Load (MWh)
10000
8000
6000
4000
2000 Forecasted Peak Load
Actual Peak Load
0
01
06
11
16
21
26
9−
9−
9−
9−
9−
9−
−0
−0
−0
−0
−0
−0
20
20
20
20
20
20
20
20
20
20
20
20
Fig. 8: Forecast and actual daily peak load of September 2020.
1.00
RF Model Naive Model
0.95
0.90
Recall
0.85
0.80
0.75
0.70
Mar
Apr
Sep
Oct
Dec
Nov
Jan
Jun
Jul
Feb
May
Aug
Fig. 9: Comparison of prediction recall for each month between RF models and naive models.
Practically, the BESS can be discharged for 2 hours during a peak day; therefore,
the 2 hours with the highest probabilities from the peak hour model prediction in each
day are selected for discharging. The peak hour prediction performance is verified in
two ways: (1) comparing predictions from RF models with the naive model predictions
using day-ahead load forecast; and (2) evaluating the number of captured peak hours
following the proposed peak day identification (e.g., 3% exceedance probability) and
Fig. 9 shows the percentage of peak hours captured (true positives) relative to the
total number of true positives and false negatives, T P/(T P + F N ), in each month for
the 6 testing years. The percentage metric, i.e., recall, is a good measure of classification
model performance for imbalanced data like in this study. For both RF and naive
models, the recall values are highest in December and January and lowest in July and
August. The RF model has better overall performance than the naive model: of the
72 peak hours in the testing data, the RF model captures 67 (93.1%) while the naive
18
Table 6: Annual performance of BESS for 6 testing years using the proposed peak day and peak hour
models.
model captures 63 (87.5%). In particular, the recall of the RF model for July is two
number of peak days and peak hours captured for all 6 testing years, using a 3%
exceedance probability threshold for peak day prediction and a 2-hour battery dis-
charging time. The results are summarized in Table 6. The average number of peak
hours captured is 10.8 per year for the 6 testing years. All 12 monthly peak hours in
2006 and 2008 are captured. For testing years 2011 and 2020, 11 of 12 peak hours are
captured and the monthly peak hours in May 2011 and September 2020 are missed.
In 2001, peak hours in May and August are missed. In 2019, peak hours in February,
May, and September are missed. The number of BESS charging/discharging cycles is
76 per year on average, ranging from 63 to 87, which meets the 100 cycles or less per
year requirement.
5. Conclusion
peak days and peak hours to better support BESS dispatch decision-making. The
proposed approach features the probabilistic definition of peak day and peak hour,
a comprehensive set of physical and temporal factors and predictors, nonlinear en-
semble ML model implementation and selection, and data augmentation. With cross-
validation and model comparison, the proposed ML framework has been proven to
work effectively. The study also provided guidance on the model choices and favorable
conditions for applying the proposed approach. The study generated an ML-enabled
dataset including cleaned historical data and derived attributes as exploratory and re-
19
sponse variables. One area of future work is to develop methods to explicitly integrate
mid- to long-term factors into forecast models. Another interesting research direction
PCA is performed to quantify cross dependence among predictors and the daily
peak load (daily peak load). As examples, the loading plots for January and July
are provided in Fig. A.10. As can be seen, for the January peak day model, the first
two components can explain about 71% of the total system variance. The maximum
actual load, the forecast maximum load, the minimum temperature, and the maximum
temperature of the operation day contribute the most to the first PC, PC1. As ex-
pected, the maximum actual load has a strong positive correlation with the forecast
maximum load and strong negative correlations with both the minimum and maximum
temperatures. For the July peak day model, the same four variables contribute the
most to PC1: the maximum actual load, the forecast maximum load, the minimum
temperature, and the maximum temperature of the operation day. Positive correla-
tions exist between the maximum actual load and both the minimum and maximum
temperatures for the operation day. The correlation between the maximum actual load
and the maximum load on the previous day is stronger in July than in January.
PCA plots for finer hourly resolution data are provided in Fig. A.11, which shows
that the first two components explain about 76% and 83% of the total variance for
January and July, respectively. Similar to the peak day models, negative correlations
The shrinkage discriminant analyses (SDA) are performed to evaluate the ranking
of the parameters for both the peak day and peak hour models. The analysis results are
summarized in Table A.7. The peak day SDA shows that the forecast maximum load
is the dominant predictor for both the winter and summer peak day models. During
the winter season, the forecast minimum temperature for the operation day is the
20
PCA 1 (54.7%)
0.6
0.4
0.2
0.0
−0.2
−0.4
−0.6
PCA 2 (16%)
0.1
0.0
−0.1
−0.2
−0.3
−0.4
−0.5
−0.6
(a) January
PCA 1 (54.3%)
0.5
0.4
0.3
0.2
0.1
0.0
PCA 2 (13.4%)
0.8
0.6
0.4
0.2
0.0
−0.2
−0.4
−0.6
load_max
daily_peak_load
T_min
T_max
prev_month_max
prev_MAX
T_min_day_2_to_7
T_max_day_2_to_7
−0.8
(b) July
Fig. A.10: PCA loading plots of peak day predictors and daily peak load.
second most important predictor, while in the summer season, the forecast maximum
temperature for the operation day becomes the second most important predictor. In
both the January and July peak hour models, the rank of the load forecast for the
predicting hour is the most important predictor. Other important predictors include
the temperature at the operation hour, and whether the predicting hour is the peak
21
PCA 1 (66.0%)
0.3
0.2
0.1
0.0
−0.1
−0.2
−0.3
PCA 2 (10.0%)
0.6
0.4
0.2
0.0
−0.2
−0.4
(a) January
PCA 1 (68.8%)
0.3
0.2
0.1
0.0
−0.1
−0.2
−0.3
PCA 2 (13.8%)
0.6
0.4
0.2
0.0
−0.2
T
load_actual
Humidity
T_m_1
T_m_2
T_M_3
T_p_1
T_p_2
T_p_3
load_m_1
load_m_2
load_m_3
load_p_1
load_p_2
load_p_3
after_max_load
load_forecast
prev_max_load
rank_load_forecast
peak_prev_day
load_prevDay_demand
rank_load_prevDay
load_prevDay_forecast
−0.4
(b) July
Fig. A.11: PCA loading plots of peak hour model predictors for January and July.
22
Table A.7: Top ranked predictors for the peak day and peak hour models from SDA.
23
References
Akaike, H. (1974). A new look at the statistical model identification. IEEE Transac-
Berscheid, A., Makarov, Y., Hou, Z., Diao, R., Zhang, Y., Samaan, N., Yuan, Y., &
Zhou, H. (2018). An open-source tool for automated power grid stress level pre-
Cheng, Y.-Y., Chan, P. P., & Qiu, Z.-W. (2012). Random forest based ensemble system
for short term load forecasting. In Proceedings of the IEEE International Conference
Cieslak, D. A., & Chawla, N. V. (2008). Learning decision trees for unbalanced data.
Domingos, P. (2012). A few useful things to know about machine learning. Communi-
El-Attar, E., Goulermas, J., & Wu, Q. (2009). Forecasting electric daily peak load
based on local prediction. In Proceedings of the IEEE Power and Energy Society
El Desouky, A., & Elkateb, M. (2000). Hybrid adaptive techniques for electric-load
forecast using ann and arima. IEE Proceedings-Generation, Transmission and Dis-
24
Goodwin, M., & Yazidi, A. (2016). A pattern recognition approach for peak prediction
Hong, T., & Fan, S. (2016). Probabilistic electric load forecasting: A tutorial review.
Hong, T., & Wang, P. (2014). Fuzzy interaction regression for short term load fore-
Huang, N., Lu, G., & Xu, D. (2016). A permutation importance-based feature selection
method for short-term electricity load forecasting using random forest. Energies, 9 ,
767.
feature subset selection and classification and regression. In Proceedings of the IEEE
65–68).
Jiang, Y. H., Levman, R., Golab, L., & Nathwani, J. (2014). Predicting peak-demand
days in the Ontario peak reduction program for large consumers. In Proceedings of
Lahouar, A., & Slama, J. B. H. (2015). Day-ahead load forecast using random forest
and expert input selection. Energy Conversion and Management, 103 , 1040–1051.
Liu, F., Dong, T., Hou, T., & Liu, Y. (2021). A hybrid short-term load forecasting
model based on improved fuzzy c-means clustering, random forest and deep neural
Liu, J., & Brown, L. E. (2019a). Effect of forecast accuracy on day ahead prediction of
Liu, J., & Brown, L. E. (2019b). Prediction of hour of coincident daily peak load. In
Massaoudi, M., Refaat, S. S., Chihi, I., Trabelsi, M., Oueslati, F. S., & Abu-Rub, H.
25
Niu, D., Wang, Y., & Wu, D. D. (2010). Power load forecasting using support vector
machine and ant colony optimization. Expert Systems with Applications, 37 , 2531–
2539.
https://www.ncdc.noaa.gov/cdo-web/datasets/LCD/stations/WBAN:13722/detail.
Accessed: 10-25-2021.
Ringwood, J. V., Bofelli, D., & Murray, F. T. (2001). Forecasting electricity demand
on short, medium and long time scales using neural networks. Journal of Intelligent
Ryu, B., Makanju, T., Lasek, A., An, X., & Cercone, N. (2016). A Naive Bayesian
classification model for determining peak energy demand in Ontario. In Smart City
Saini, L. M. (2008). Peak load forecasting using Bayesian regularization, resilient and
Saxena, H., Aponte, O., & McConky, K. T. (2019). A hybrid machine learning model
for forecasting a billing period’s peak electric load days. International Journal of
Forecasting, 35 , 1288–1303.
Sobhani, M., Hong, T., & Martin, C. (2020). Temperature anomaly detection for
Medicine, 18 , 1099–1104.
26