The subsequent discussion and analysis are anchored in the initial premise that constructing an energy consumption forecast model is inherently complex, primarily due to the multitude of decision-making processes involved.
To enhance clarity in comprehending the construction of load prediction models, a structured pipeline has been introduced. This pipeline encompasses the stages essential for developing multivariate and multistep models utilizing deep learning techniques. Each stage is meticulously justified, emphasizing its necessity and specific contribution.
Thus, what follows is a systematic evaluation of the fundamental components essential to composing accurate load forecasting models. To demonstrate the pipeline's applicability and evaluate its efficacy, a comprehensive array of experiments has been conducted. These experiments encompass various input conditions (number of variables) and output conditions (time horizon), as detailed in the subsequent tables. Notably, they encompass different configurations of input variables, prediction algorithms, and model architectures (shallow or deep).
3.2. Experiments
The conducted experiments are summarized in
Table 3,
Table 4,
Table 5 and
Table 6, encompassing various combinations of input variables, algorithms, and prediction horizons. The implementation was carried out using the Python programming language along with machine learning libraries, Sklearn and Keras [
34]. In order to underscore the significance of step (1) of the pipeline, experiments detailed in
Table 3 were conducted, focusing on variations in input variables and comparing processing times.
It is important to highlight that the processing detailed in
Table 3 includes seasonality and calendar representation. Additionally, it's noteworthy that the variable selection algorithms employed originate either from the Weka tool or were custom-built in Python (refer to the source column). The experimental results were compared based on precision (MAPE) and processing time (refer to the magnitudes column).
Table 3.
Experiments with Variation in Input Variables (Horizon: One Step Ahead).
Table 3.
Experiments with Variation in Input Variables (Horizon: One Step Ahead).
| Technique |
Source |
Selected variables |
Magnitudes |
Dnn |
Cnn |
Lstm |
Cnn+Lstm |
| Shallow |
Deep |
Shallow |
Deep |
Shallow |
Deep |
Shallow |
Deep |
| Cfs Subset Evail |
Weka |
RT demand, DACC, DA MLC, RT MLC, MIN_5MIN_RSP, MAX_5MIN_RSP
|
Mape |
0,22 |
0,18 |
1,8 |
0,74 |
0,37 |
0,24 |
0,21 |
0,18 |
| t(s) |
152 |
185 |
276 |
340 |
887 |
1798 |
739 |
848 |
| Classifier atribute Evail |
MAX_5MIN_RSP, DA EC, DA CC, RT demand, DA LMP |
Mape |
0,27 |
0,23 |
1,6 |
0,48 |
0,21 |
0,16 |
0,26 |
0,24 |
| t(s) |
153 |
187 |
342 |
384 |
994 |
1813 |
761 |
790 |
| Principal Componentes |
RT LMP, RT EC, DA LMP, DA EC, RT MLC |
Mape |
7,8 |
6,84 |
9,67 |
6,5 |
10,95 |
9,79 |
8,06 |
7,57 |
| t(s) |
87 |
130 |
150 |
219 |
594 |
912 |
996 |
386 |
| Relief |
RT demand, DA demand, DA EC, DA LMC, Reg Service Price |
Mape |
0,52 |
0,33 |
3,82 |
0,22 |
0,23 |
0,16 |
0,16 |
0,17 |
| t(s) |
112,8 |
123 |
274 |
339 |
906 |
1792 |
692 |
823 |
| Mutual information |
Python |
DA MLC, DA LMP, MIN_5MIN_RSP, DA EC, Dew Point |
Mape |
5,9 |
5,76 |
8,15 |
5,03 |
10,21 |
7,82 |
7,23 |
6,11 |
| t(s) |
155 |
186 |
270 |
339 |
581 |
1827 |
725 |
792 |
| - |
- |
All |
Mape |
0,86 |
0,38 |
2,27 |
1,05 |
0,29 |
0,2 |
0,25 |
0,20 |
| t(s) |
118 |
123 |
158 |
153 |
591 |
920 |
695 |
879 |
Based on these experiments, the following observations can be made:
- ○
Among the tested variable selection algorithms, notable ones include CFS Subset Eval, Classifier Attribute Eval, and Relief. These algorithms selected the 5 or 6 variables most correlated with the target variable, yielding predictions with error rates similar to or lower than those obtained when considering all variables in the database (as indicated in the last line of
Table 3). This underscores the relevance of the selected variables.
- ○
Regarding the performance of models with different prediction algorithms, LSTM stands out for requiring the highest computational cost. It necessitates 10 times more processing time than DNN, 5 times more than CNN, and 2.5 times more than the combined CNN+LSTM model. However, the models employing LSTM and a combination of CNN+LSTM achieved the highest accuracy.
- ○
Comparing the performance of shallow and deep models, it was observed that the latter incur a higher computational cost. Nevertheless, in most scenarios, they demonstrate superior accuracy compared to shallow models.
To demonstrate the importance of integrating external factors into the model, as outlined in step (2) of the pipeline, some experiments were conducted, and their results are presented in
Table 4 and
Table 5.
In these tables, the columns indicate the presence of external factors, with the distinction based on the prediction horizon. The acronyms and elements included in the columns are defined as follows: Sh-Shallow; D-Deep; Sl-System Load; W-Weather; S-Sazonality; Fs-Feature Selection; Av-All Variable, Id-Discomfort index, Δ- Percentage variation of error. For instance, the column Sl+W presents the results incorporating both System Load and Sazonality external factors for different prediction algorithms.
Table 4.
MAPE of Processes with Different Sets of Input Variables.
Table 4.
MAPE of Processes with Different Sets of Input Variables.
| Horizon: One step ahead |
| Technique |
Model |
Sl (1) |
Sl+W (2) |
Sl+S+C+Id (3) |
Δ(%) (4) |
Fs (5) |
Fs+S+C+Id (6) |
Δ(%) (7) |
Av (8) |
Av+S+C+Id (9) |
Δ(%) (10) |
| Dnn |
Sh |
11,3 |
6,76 |
5,38 |
52,4 |
0,29 |
0,19 |
34,5 |
0,19 |
0,18 |
5,3 |
| D |
10,85 |
5,98 |
8,57 |
44,9 |
0,37 |
0,17 |
54,1 |
0,22 |
0,17 |
22,7 |
| Cnn |
Sh |
12,13 |
8,46 |
8,0 |
34 |
2,85 |
2,23 |
21,8 |
3,40 |
2,26 |
33,5 |
| D |
11,04 |
4,95 |
4,29 |
61,1 |
0,18 |
0,18 |
0 |
0,26 |
0,16 |
38,5 |
| Lstm |
Sh |
12,37 |
8,31 |
7,86 |
36,5 |
0,65 |
0,25 |
61,5 |
0,47 |
0,17 |
63,8 |
| D |
11,74 |
7,59 |
9,0 |
23,3 |
14,1 |
7,07 |
49,8 |
14,96 |
10,45 |
30,1 |
|
Cnn+Lstm
|
Sh |
10,38 |
6,56 |
5,67 |
45,4 |
0,31 |
0,21 |
32,2 |
0,42 |
0,19 |
54,8 |
| D |
11,11 |
5,09 |
7,60 |
31,6 |
0,25 |
0,15 |
40 |
0,25 |
0,24 |
4 |
Table 5.
MAPE of Processes with Different Sets of Input Variables.
Table 5.
MAPE of Processes with Different Sets of Input Variables.
| Horizon: Twelve step ahead |
| Technics |
Model |
Sl (1) |
Sl+W (2) |
Sl+S+C+Id (3) |
Δ(%) (4) |
Fs (5) |
Fs+S+C+Id (6) |
Δ(%) (7) |
Av (8) |
Av+S+C+Id (9) |
Δ(%) (10) |
| Dnn |
Sh |
33,2 |
23,44 |
27,98 |
15,7 |
36,58 |
29,77 |
18,6 |
29,8 |
29,76 |
0,13 |
| D |
48,1 |
27,63 |
37,01 |
23,1 |
45,03 |
32,4 |
28,1 |
44,0 |
40,58 |
7,77 |
| Cnn |
Sh |
12,01 |
15,37 |
4,92 |
59,0 |
4,91 |
4,83 |
1,6 |
4,92 |
4,68 |
4,9 |
| D |
10,6 |
9,19 |
3,77 |
64,4 |
4,79 |
3,96 |
17,3 |
4,39 |
3,63 |
17,7 |
| Lstm |
Sh |
13,00 |
14,36 |
9,82 |
24,5 |
4,39 |
4,30 |
2,0 |
4,29 |
3,66 |
14,7 |
| D |
15,58 |
15,65 |
15,27 |
2,0 |
15,8 |
11,34 |
4,46 |
15,4 |
15,15 |
1,62 |
|
Cnn+Lstm
|
Sh |
15,00 |
8,04 |
4,58 |
69,5 |
4,42 |
3,93 |
11,0 |
4,12 |
4,09 |
0,7 |
| D |
11,24 |
8,65 |
10,7 |
4,8 |
15,94 |
10,82 |
32,1 |
15,6 |
15,36 |
1,5 |
Considering the experiments detailed in
Table 4 and
Table 5, the following observations can be made:
- ○
The distinguishing factor between the tables is the prediction horizon. It is evident that increasing the prediction horizon leads to a reduction in accuracy.
- ○
Experiments involving only the target variable (Sl), with or without external factors, exhibited the highest errors. This implies that deep learning algorithms face limitations in their generalization capacity when operating with a very limited number of input variables, resulting in elevated error rates.
- ○
Comparing predictions based on only the target variable (Sl), the selected variables (Fs), and all variables in the dataset (Av), it is notable that errors in the Fs and Av columns are closely aligned. This suggests that despite variable selection reducing the number of input variables from 23 to 6 or 7, this reduction did not lead to an increase in prediction errors.
To evaluate the impact of architecture on the model's performance, experiments detailed in
Table 6 were carried out. These experiments varied the number of intermediate layers and neurons within those layers. Deep learning models were employed, and variable selection was conducted using the Weka Classifier Attribute Eval. Additionally, the inclusion of external factors such as seasonality and calendar was taken into account during the experiments.
Table 6.
Experiments with deep models varying the number of intermediate layers and neurons per intermediate layer (MAPE values for one-step-ahead prediction).
Table 6.
Experiments with deep models varying the number of intermediate layers and neurons per intermediate layer (MAPE values for one-step-ahead prediction).
| |
DNN |
CNN |
LSTM |
CNN+LSTM |
| Number of neurons |
Number of neurons |
Number of neurons |
Number of neurons |
| 6 |
15 |
32 |
6 |
15 |
32 |
6 |
15 |
32 |
6 |
15 |
32 |
| Number of intermediate layers |
2 |
0,24 |
0,15 |
0,41 |
0,18 |
0,15 |
0,15 |
0,23 |
0,16 |
0,19 |
0,3 |
0,15 |
0,25 |
| 3 |
0,3 |
0,54 |
0,16 |
0,15 |
0,26 |
0,29 |
0,52 |
0,15 |
0,17 |
0,18 |
0,43 |
0,52 |
| 4 |
0,17 |
0,44 |
0,2 |
0,19 |
0,18 |
0,17 |
2,34 |
0,46 |
0,81 |
0,18 |
0,17 |
0,17 |
| 6 |
0,24 |
0,15 |
0,16 |
0,3 |
0,18 |
0,41 |
10,0 |
15,4 |
0,40 |
15,53 |
0,40 |
0,35 |
From the point of view of the model structure,
Table 6 suggests that utilizing two or three intermediate layers with a recommended number of neurons equal to 6 (Eq. (8)) enables the generation of predictions with lower computational cost and error rates within an acceptable range (<1%).
In summary, the conducted experiments allow for several conclusions:
- ○
Multivariate and multistep models offer flexibility by permitting variations in the number of input variables and prediction intervals, making them appealing for energy consumption forecasts.
- ○
It has been demonstrated that incorporating external factors enhances model accuracy, with experiments achieving up to a 60% increase in accuracy.
- ○
It has been proven that incorporating external factors increases the accuracy of the model, with experiments achieving an accuracy increase of up to 60%.
- ○
Variable selection is a necessary measure when the number of input variables is large. It enables the reduction of the problem's dimensionality while still achieving good accuracy through the model. This reduction in dimensionality promotes the application of deep learning techniques and the utilization of deep models.
- ○
In deep learning models, defining the architecture is a crucial step. The experiments have demonstrated that it's unnecessary to incorporate more than three intermediate layers or introduce an excessive number of neurons within these layers. It has been proven that adhering to the number of neurons defined by Eq. (8) yields satisfactory results.
- ○
From the perspective of model accuracy, it's evident that the lowest error rate achieved was 0.15% when employing the CNN+LSTM deep learning technique, which considered both variable selection and the representation of external factors. In [
37], the lowest error using CNN was 0.8%, while in [
38], employing LSTM, it was 1.44%. Additionally, [
8] suggests that errors ranging from 1% to 5% are typically expected for aggregate consumption.
- ○
Table 4 and
Table 5 show results for experiments conducted under various input conditions and prediction horizons. The lowest error rates are highlighted in bold within these tables. It is evident that CNN models and composite models (CNN+LSTM) consistently demonstrated the lowest error rates across most scenarios. It occurs due to the advantageous feature extraction capability of CNN from input variables. The presence of CNN in both models significantly contributed to error rate reduction. Moreover, LSTM's proficiency in handling time series data further enhanced the composite model's performance, allowing it to surpass other models in certain experiments.