1. Introduction
Recently, the smart grid has been gaining much attention as a feasible solution to the current global energy shortage problem [
1]. Since it has many benefits, including those related to reliability, economics, efficiency, environment, and safety, diverse issues and challenges to implementing such a smart grid have been extensively surveyed and proposed [
2]. A smart grid [
1,
2] is the next-generation power grid that merges information and communication technology (ICT) with the existing electrical grid to advance electrical power efficiency to the fullest by exchanging information between energy suppliers and consumers in real-time [
3]. This enables the energy supplier to perform efficient energy management for renewable generation sources (solar radiation, wind, etc.) by accurately forecasting power consumption [
4]. Therefore, for a more efficient operation, the smart grid requires precise electrical load forecasting in both the short-term and medium-term [
5,
6]. Short-term load forecasting (STLF) aims to prepare for losses caused by energy failure and overloading by maintaining an active power consumption reserve margin [
5]. It includes daily electrical load, highest or peak electrical load, and very short-term load forecasting (VSTLF). Generally, STLF is used to regulate the energy system from 1 h to one week [
7]. Accordingly, daily load forecasting is used in the energy planning for the next one day to one week [
8,
9].
A higher-education building complex, such as a university campus, is composed of a building cluster with a high electrical load, and hence, has been a large electric power distribution consumer in Korea [
10,
11,
12]. In terms of operational cost management, forecasting can help in determining where, if any, savings can be made, as well as uncovering system inefficiencies [
13]. In terms of scheduling, forecasting can be helpful for improving the operational efficiency, especially in an energy storage system (ESS) or renewable energy.
Forecasting the electrical load of a university campus is difficult due to its irregular power consumption patterns. Such patterns are determined by diverse factors, such as the academic schedule, social events, and natural condition. Even on the same campus, the electrical load patterns among buildings differ, depending on the usage or purpose. For instance, typical engineering and science buildings show a high power consumption, while dormitory buildings show a low power consumption. Thus, to accurately forecast the electrical load of university campus, we also need to consider the building type and power usage patterns.
By considering power consumption patterns and various external factors together, many machine learning algorithms have shown a reasonable performance in short-term load forecasting [
3,
4,
6,
8,
14,
15,
16,
17]. However, even machine learning algorithms with a higher performance have difficulty in making accurate predictions at all times, because each algorithm adopts a different weighting method [
18]. Thus, we can see that there will always be randomness or inherent uncertainty in every prediction [
19]. For instance, most university buildings in Korea show various electrical load patterns which differ, depending on the academic calendar. Furthermore, Korea celebrates several holidays, such as Buddha’s birthdays and Korean Thanksgiving days, called Chuseok, during the semester, which are counted on the lunar calendar. Since the campus usually remains closed on the holidays, the power consumption of the campus becomes very low. In such cases, it is difficult for a single excellent algorithm to make accurate predictions for all patterns. However, other algorithms can make accurate predictions in areas where the previous algorithm has been unable to do so. For this purpose, a good approach is to apply two or more algorithms to construct a hybrid probabilistic forecasting model [
14]. Many recent studies have addressed a hybrid approach for STLF. Abdoos et al. [
20] proposed a hybrid intelligent method for the short-term load forecasting of Iran’s power system using wavelet transform (WT), Gram-Schmidt (GS), and support vector machine (SVM). Dong et al. [
21] proposed a hybrid data-driven model to predict the daily total load based on an ensemble artificial neural network. In a similar way, Lee and Hong [
22] proposed a hybrid model for forecasting the monthly power load several months ahead based on a dynamic and fuzzy time series model. Recently, probabilistic forecasting has arisen as an active topic and it could provide quantitative uncertainty information, which can be useful to manage its randomness in the power system operation [
23]. Xiao et al. [
18] proposed no negative constraint theory (NNCT) and artificial intelligence-based combination models to predict future wind speed series of the Chengde region. Jurado et al. [
24] proposed hybrid methodologies for electrical load forecasting in buildings with different profiles based on entropy-based feature selection with AI methodologies. Feng et al. [
25] developed an ensemble model to produce both deterministic and probabilistic wind forecasts that consists of multiple single machine learning algorithms in the first layer and blending algorithms in the second layer. In our previous study [
12], we built a daily electrical load forecast model based on random forest. In this study, to improve the forecasting performance of that model, we first classify the electrical load data by pattern similarity using a decision tree. Then, we construct a hybrid model based on random forest and multilayer perceptron by considering similar time series patterns.
The rest of this paper is organized as follows. In
Section 2, we introduce several previous studies on the machine learning-based short-term load forecasting model. In
Section 3, we present all the steps for constructing our hybrid electrical load forecasting model in detail. In
Section 4, we describe several metrics for performance a comparison of load forecasting models. In
Section 5, we describe how to evaluate the performance of our model via several experiments and show some of the results. Lastly, in
Section 6, we briefly discuss the conclusion.
2. Related Work
So far, many researchers have attempted to construct STLF using various machine learning algorithms. Vrablecová et al. [
7] developed the suitability of an online support vector regression (SVR) method to short-term power load forecasting and presented a comparison of 10 state-of-the-art forecasting methods in terms of accuracy for the public Irish Commission for Energy Regulation (CER) dataset. Tso and Yau [
26] conducted weekly power consumption prediction for households in Hong Kong based on an artificial neural network (ANN), multiple regression (MR), and a decision tree (DT). They built the input variables of their prediction model by surveying the approximate power consumption for diverse electronic products, such as air conditioning, lighting, and dishwashing. Jain et al. [
27] proposed a building electrical load forecasting model based on SVR. Electrical load data were collected from multi-family residential buildings located at the Columbia University campus in New York City. Grolinger et al. [
28] proposed two electrical load forecasting models based on ANN and SVR to consider both events and external factors and performed electrical load forecasting by day, hour, and 15-min intervals for a large entertainment building. Amber et al. [
29] proposed two forecasting models, genetic programming (GP) and MR, to forecast the daily power consumption of an administration building in London. Rodrigues et al. [
30] performed forecasting methods of daily and hourly electrical load by using ANN. They used a database with consumption records, logged in 93 real households in Lisbon, Portugal. Efendi et al. [
31] proposed a new approach for determining the linguistic out-sample forecasting by using the index numbers of the linguistics approach. They used the daily load data from the National Electricity Board of Malaysia as an empirical study.
Recently, a hybrid prediction scheme using multiple machine learning algorithms has shown a better performance than the conventional prediction scheme using a single machine learning algorithm [
14]. The hybrid model aims to provide the best possible prediction performance by automatically managing the strengths and weaknesses of each base model. Xiao et al. [
18] proposed two combination models, the no negative constraint theory (NNCT) and the artificial intelligence algorithm, and showed that they can always achieve a desirable forecasting performance compared to the existing traditional combination models. Jurado et al. [
24] proposed a hybrid methodology that combines feature selection based on entropies with soft computing and machine learning approaches (i.e., fuzzy inductive reasoning, random forest, and neural networks) for three buildings in Barcelona. Abdoos et al. [
20] proposed a new hybrid intelligent method for short-term load forecasting. They decomposed the electrical load signal into two levels using wavelet transform and then created the training input matrices using the decomposed signals and temperature data. After that, they selected the dominant features using the Gram–Schmidt method to reduce the dimensions of the input matrix. They used SVM as the classifier core for learning patterns of the training matrix. Dong et al. [
21] proposed a novel hybrid data-driven “PEK” model for predicting the daily total load of the city of Shuyang, China. They constructed the model by using various function approximates, including partial mutual information (PMI)-based input variable selection, ensemble artificial neural network (ENN)-based output estimation, and K-nearest neighbor (KNN) regression-based output error estimation. Lee and Hong [
22] proposed a hybrid model for forecasting the electrical load several months ahead based on a dynamic (i.e., air temperature dependency of power load) and a fuzzy time series approach. They tested their hybrid model using actual load data obtained from the Seoul metropolitan area, and compared its prediction performance with those of the other two dynamic models.
Previous studies on hybrid forecasting models comprise parameter selection and optimization technique-based combined approaches. This approach has the disadvantages that it is dependent on a designer’s expertise and exhibits low versatility [
18]. On the other hand, this paper proposes data post-processing technique combined approaches to construct a hybrid forecasting model by combining random forest and multilayer perceptron (MLP).
3. Hybrid Short-Term Load Forecasting
In this section, we describe our hybrid electrical load forecasting model. The overall steps for constructing the forecasting model are shown in
Figure 1. First, we collect daily power consumption data, time series information, and weather information, which will be used as independent variables for our hybrid STLF model. After some preprocessing, we build a hybrid prediction model based on random forest and MLP. Lastly, we perform a seven-step-ahead (one week or 145 h ahead) time series cross-validation for the electrical load data.
3.1. Dataset
To build an effective STLF model for buildings or building clusters, it is crucial to collect their real power consumption data that show the power usage of the buildings in the real world. For this purpose, we considered three clusters of buildings with varied purposes and collected their daily power consumption data from a university in Korea. The first cluster is composed of 32 buildings with academic purposes, such as the main building, amenities, department buildings, central library, etc. The second cluster is composed of 20 buildings, with science and engineering purposes. Compared to other clusters, this cluster showed a much higher electrical load, mainly due to the diverse experimental equipment and devices used in the laboratories. The third cluster comprised 16 dormitory buildings, whose power consumption was based on the residence pattern. In addition, we gathered other data, including the academic schedule, weather, and event calendar. The university employs the i-Smart system to monitor the electrical load in real time. This is an energy portal service operated by the Korea Electric Power Corporation (KEPCO) to give consumers electricity-related data such as electricity usage and expected bill to make them use electricity efficiently. Through this i-Smart system, we collected the daily power consumption of six years, from 2012 to 2017. For weather information, we utilized the regional synoptic meteorological data provided by the Korea Meteorological Office (KMA). KMA’s mid-term forecast provides information including the date, weather, temperature (maximum and minimum), and its reliability for more than seven days.
To build our hybrid STLF model, we considered nine variables; month, day of the month, day of the week, holiday, academic year, temperature, week-ahead load, year-ahead load, and LSTM Networks. In particular, the day of the week is a categorized variable and we present the seven days using integers 1 to 7 according to the ISO-8601 standard [
32]. Accordingly, 1 indicates Monday and 7 indicates Sunday. Holiday, which includes Saturdays, Sundays, national holidays, and school anniversary [
33], indicates whether the campus is closed or not. A detailed description of the input variables can be found in [
12].
3.2. Data Preprocessing
3.2.1. Temperature Adjustment
Generally, the power consumption increases in summer and winter due to the heavy use of air conditioning and electric heating appliances, respectively. Since the correlations between the temperature and electrical load in terms of maximum and minimum temperatures are not that high, we need to adjust the daily temperature for more effective training based on the annual average temperature of 12.5 provided by KMA [
34], using Equation (1) as follows:
To show that the adjusted temperature has a higher correlation than the minimum and maximum temperatures, we calculated the Pearson correlation coefficients between the electrical load and minimum, maximum, average, and adjusted temperatures, as shown in
Table 1. In the table, the adjusted temperature shows higher coefficients for all building clusters compared to other types of temperatures.
3.2.2. Estimating the Week-Ahead Consumption
The electrical load data from the past form one of the perfect clues for forecasting the power consumption of the future and the power consumption pattern relies on the day of the week, workday, and holiday. Hence, it is necessary to consider many cases to show the electrical load of the past in the short-term load forecasting. For instance, if the prediction time is a holiday and the same day in the previous week was a workday, then their electrical loads can be very different. Therefore, it would be better to calculate the week-ahead load at the prediction time not by the electrical load data of the coming week, but by averaging the electrical loads of the days of the same type in the previous week. Thus, if the prediction time is a workday, we use the average electrical load of all workdays of the previous week as an independent variable. Likewise, if the prediction time is a holiday, we use the average electrical load of all holidays of the previous week. In this way, we reflect the different electrical load characteristics of the holiday and workday in the forecasting.
Figure 2 shows an example of estimating the week-ahead consumption. If the current time is Tuesday, we already know the electrical load of yesterday (Monday). Hence, to estimate the week-ahead consumption of the coming Monday, we use the average of the electrical loads of workdays of the last week.
3.2.3. Estimating the Year-Ahead Consumption
The year-ahead load aims to utilize the trend of the annual electrical load by showing the power consumption of the same week of the previous year. However, the electrical load of the exact same week of the previous year is not always used because the days of the week are different and popular Korean holidays are celebrated according to the lunar calendar. Every week of the year has a unique week number based on ISO-8601 [
32]. As mentioned before, the average of power consumptions of all holidays or workdays of the week are calculated to which the prediction time belongs and depending on the year, one year comprises 52 or 53 weeks. In the case of an issue such as the prediction time belongs to the 53rd week, there is no same week number in the previous year. To solve this problem, the power consumption of the 52nd week from the previous year is utilized since the two weeks have similar external factors. Especially, electrical loads show very low consumption on a special holiday like the Lunar New Year holidays and Korean Thanksgiving days [
35]. To show this usage pattern, the average power consumption of the previous year’s special holiday represents the year-ahead’s special holiday’s load. The week number can differ depending on the year, so representing the year-ahead’s special holiday power consumption cannot be done directly using the week number of the holiday. This issue can be handled easily by exchanging the power consumption of the week and the week of the holiday in the previous year.
Figure 3 shows an example of estimating the year-ahead consumption. If the current time is Monday of the 33rd week 2016, we use the 33rd week’s electrical load of the last year. To estimate the year-ahead consumption of Sunday of the 33rd week, we use the average of the electrical loads of the holidays of the 33rd week of the last year.
3.2.4. Load Forecasting Based on LSTM Networks
A recurrent neural network (RNN) is a class of ANN where connections between units form a directed graph along a sequence. Unlike a feedforward neural network (FFNN), RNNs can use their internal state or memory to process input sequences [
36]. RNNs can handle time series data in many applications, such as unsegmented, connected handwriting recognition or speech recognition [
37]. However, RNNs have problems in that the gradient can be extremely small or large; these problems are called the vanishing gradient and exploding gradient problems. If the gradient is extremely small, RNNs cannot learn data with long-term dependencies. On the other hand, if the gradient is extremely large, it moves the RNN parameters far away and disrupts the learning process. To handle the vanishing gradient problem, previous studies [
38,
39] have proposed sophisticated models of RNN architectures. One successful model is long short-term memory (LSTM), which solves the RNN problem through a cell state and a unit called a cell with multiple gates. LSTM Networks use a method that influences the behind data by reflecting the learned information with the previous data as the learning progresses with time. Therefore, it is suitable for time series data, such as electrical load data. However, the LSTM networks can reflect yesterday’s information for the next day’s forecast. Since the daily load forecasting of a smart grid aims to be scheduled until after a week, LSTM networks are not suitable for application to the daily load forecasting because there is a gap of six days. Furthermore, if the prediction is not valid, the LSTM model method can give a bad result. For instance, national holidays, quick climate change, and unexpected institution-related events can produce unexpected power consumption. Therefore, the LSTM model alone is not enough for short-term load forecasting due to its simple structure and weakness in volatility. Eventually, a similar life pattern can be observed depending on the day of the week, which in return gives a similar electrical load pattern. This study uses the LSTM networks method to show the repeating pattern of power consumptions depending on the day of the week. The input variable period of the training dataset is composed of the electrical load from 2012 to 2015 and the dependent variable of the training set is composed of the electrical load from 2013 to 2015. We performed 10-fold cross-validation on a rolling basis for optimal hyper-parameter detection.
3.3. Discovering Similar Time series Patterns
So far, diverse machine learning algorithms have been proposed to predict electrical load [
1,
3,
6,
14]. However, they showed different prediction performances depending on the various factors. For instance, for time series data, one algorithm gives the best prediction performance on one segment, while for other segments, another algorithm can give the best performance. Hence, one way to improve the accuracy in this case is to use more than one predictive algorithm. We consider electrical load data as time series data and utilize a decision tree to classify the electrical load data by pattern similarity. Decision trees [
26,
40] can handle both categorical and numerical data, and are highly persuasive because they can be analyzed through each branch of the tree, which represents the process of classification or prediction. In addition, they exhibit a high explanatory power because they can confirm which independent variables have a higher impact when predicting the value of a dependent or target variable. On the other hand, continuous variables used in the prediction of values of the time series are regarded as discontinuous values, and hence, the prediction errors are likely to occur near the boundary of separation. Hence, using the decision tree, we divide continuous dependent variables into several classes with a similar electrical load pattern. To do this, we use the training dataset from the previous three years. We use the daily electrical load as the attribute of class label or dependent variable and the characteristics of the time series as independent variables, representing year, month, day, day of the week, holiday, and academic year. Details on the classification of time series data will be shown in the experimental section.
3.4. Building a Hybrid Forecasting Model
To construct our hybrid prediction model, we combine both a random forest model and multilayer perceptron model. Random forest is a representative ensemble model, while MLP is a representative deep learning model; both these models have shown an excellent performance in forecasting electrical load [
5,
12,
15,
16,
17].
Random forest [
41,
42] is an ensemble method for classification, regression, and other tasks. It constructs many decision trees that can be used to classify a new instance by the majority vote. Each decision tree node uses a subset of attributes randomly selected from the original set of attributes. Random forest runs efficiently on large amounts of data and provides a high accuracy [
43]. In addition, compared to other machine learning algorithms such as ANN and SVR, it requires less fine-tuning of its hyper-parameters [
16]. The basic parameters of random forest include the total number of trees to be generated (nTree) and the decision tree-related parameters (mTry), such as minimum split and split criteria [
17]. In this study, we find the optimal mTry and nTree for our forecasting model by using the training set and then verify their performance using the validation and test set. The authors in [
42] suggested that a random forest should have 64 to 128 trees and we use 128 trees for our hybrid STLF model. In addition, the mTry values used for this study provided by scikit-learn are as follows.
Auto: max features = n features.
Sqrt: max features = sqrt (n features).
Log2: max features = log2 (n features).
A typical ANN architecture, known as a multilayer perceptron, is a type of machine learning algorithm that is a network of individual nodes, called perceptrons, organized in a series of layers [
5]. Each layer in MLP is categorized into three types: an input layer, which receives features used for prediction; a hidden layer, where hidden features are extracted; and an output layer, which yields the determined results. Among them, the hidden layer has many factors affecting performance, such as the number of layers, the number of nodes involved, and the activation function of the node [
44]. Therefore, the network performance depends on how the hidden layer is configured. In particular, the number of hidden layers determines the depth or shallowness of the network. In addition, if there are more than two hidden layers, it is called a deep neural network (DNN) [
45]. To establish our MLP, we use two hidden layers since we do not require many input variables in our prediction model. In addition, we use the same epochs and batch size as the LSTM model we described previously. Furthermore, as an activation function, we use an exponential linear unit (ELU) without the rectified linear unit (ReLU), which has gained increasing popularity recently. However, its main disadvantage is that the perceptron can die in the learning process. ELU [
46] is an approximate function introduced to overcome this disadvantage, and can be defined by:
The next important consideration is to choose the number of hidden nodes. Many studies have been conducted to determine the optimal number of hidden nodes for a given task [
15,
47,
48], and we decided to use two different hidden node counts: the number of input variables and 2/3 of the number of input variables. Since we use nine input variables, the numbers of hidden nodes we will use are 9 and 6. Since our model has two hidden layers, we can consider three configurations, depending on the hidden nodes of the first and second layers: (9, 9), (9, 6), and (6, 6). As in the random forest, we evaluate these configurations using the training data for each building cluster and identify the configuration that gives the best prediction accuracy. After that, we compare the best MLP model with the random forest model for each cluster type.
3.5. Time series Cross-Validation
To construct a forecasting model, the dataset is usually divided into a training set and test set. Then, the training set is used in building a forecasting model and the test set is used in evaluating the resulting model. However, in traditional time series forecasting techniques, the prediction performance is poorer as the interval between the training and forecasting times increases. To alleviate this problem, we apply the time series cross-validation (TSCV) based on the rolling forecasting origin [
49]. A variation of this approach focuses on a single prediction horizon for each test set. In this approach, we use various training sets, each containing one extra observation than the previous one. We calculate the prediction accuracy by first measuring the accuracy for each test set and then averaging the results of all test sets. This paper proposes a one-week (sum from 145 h to 168 h) look-ahead view of the operation for smart grids. For this, a seven-step-ahead forecasting model is built to forecast the power consumption at a single time (h + 7 + i − 1) using the test set with observations at several times (1, 2, …, h + i − 1). If h observations are required to produce a reliable forecast, then, for the total T observations, the process works as follows.
For i = 1 to T − h − 6:
- (1)
Select the observation at time h + 7 + i − 1 for the test set;
- (2)
Consider the observations at several times 1, 2, ⋯, h + i − 1 to estimate the forecasting model;
- (3)
Calculate the 7-step error on the forecast for time h + 7 + i − 1;
- (4)
Compute the forecast accuracy based on the errors obtained.
6. Conclusions
In this paper, we proposed a hybrid model for short-term load forecasting for higher educational institutions, such as universities, using random forest and multilayer perceptron. To construct our forecast model, we first grouped university buildings into an academic cluster, science/engineering cluster, and dormitory cluster, and collected their daily electrical load data over six years. We divided the collected data into a training set, a validation set, and a test set. For the training set, we classified electrical load data by pattern similarity using the decision tree technique. We considered various configurations for random forest and multilayer perceptron and evaluated their prediction performance by using the validation set to select the optimal model. Based on this work, we constructed our hybrid daily electrical load forecast model by selecting models with a better predictive performance in similar time series. Finally, using the test set, we compared the daily electrical load prediction performance of our hybrid model and other popular models. The comparison results show that our hybrid model outperforms other popular models. In conclusion, we showed that LSTM networks are effective for reflecting an electrical load depending on the day of the week and the decision tree is effective in classifying time series data by similarity. Moreover, using these two forecasting models in a hybrid model can complement their weaknesses.
In order to improve the accuracy of electrical load prediction, we plan to use a supervised learning method reflecting various statistically significant data. Also, we will analyze the prediction performance in different look-ahead points (from the next day to a week) using probabilistic forecasting.