# Machine Learning Approach for Short-Term Load Forecasting Using Deep Neural Network

^{1}

^{2}

^{3}

## Abstract

**:**

^{2}and mean absolute error (MAE). Statistical tests are performed in order to verify the results and examine whether these models are statistically different or not. The results reveal that the DNN model outperformed the other models and was statistically different from them.

## 1. Introduction

- Historical load data in megawatts (MW) and megavolt amperes (MAVR).
- Weather conditions (temperature, dew point, pressure, sky cover, visibility, wind speed, etc.).
- Economic indicators (energy prices, local industrial production, housing starts, etc.).
- Time factor (time of the year, the day of the week, and hour of the day).
- Customers’ classes (residential, commercial, industrial, hospitals, etc.).

## 2. Datasets and Methodology

#### 2.1. Brief Information on Datasets for the Experimental Demonstration

#### Data Preparation and Correlation Analysis

#### 2.2. Methods for Load Forecasting

#### 2.2.1. Deep Neural Network (DNN)

#### 2.2.2. Artificial Neural Network (ANN)

#### 2.2.3. Decision Tree (DT)

- A-
- Initial node is selected and assigned to a discretional attribute value A.
- B-
- The border value of A is determined and the partition entropy aroused by value A is calculated; after that, the minimum one will be selected.
- C-
- For all attributes, gain below will be calculated and the attribute that has highest gain will be considered. The selected attribute will be the sort basis for the tree and the decision tree will be expanded at this particular node.
- D-
- The procedures above will be repeated until two main points are reached:
- 1-
- Every node has only one node left and this node is called leaf node where there is no more expansion.
- 2-
- The gain factor reaches the stopping criterion where there is no more sorting process.

Decision tree inducers can be classified into two types or conceptual phases [29]:

#### 2.3. Model Performance Criteria

^{2}and mean absolute residual MAR are used as evaluation criteria. Moreover, the time that each model takes for training is also considered. When R

^{2}gets closer to 1 and MAR gets closer to the zero, the accuracy of the model is very high. MAR depends on the unit of the predicted value. For instant, if the unit of the predicted value in megawatts (106 watts), it is reasonable to have some kilowatts as an error.

^{2}(the coefficient of determination) is a number (equal or below 1) that describes how well the data fit the regression model. It varies from 1 (when the regression line passes through all the data) to 0 (when there is no correlation—poor correlation). Mean absolute residual is measuring how far the predicted values are to the actual values. Clearly, the model is accurate when MAR is getting lower.

## 3. Results and Discussion

#### 3.1. DNN-Based LF and Its Validation

#### 3.1.1. DNN-Based LF

#### 3.1.2. Validation Based on ARIMA and Monte Carlo Method

#### 3.2. ANN Based LF

^{2}is improved to reach 0.958. Moreover, the performance with variation of hidden layers is represented in Figure 30.

^{2}is 0.966.

#### 3.3. DT Based LF

^{2}is 0.904.

#### 3.4. Result Comparison and Validation

^{2}criteria. ANN model has the lowest MAR in single and double layers which are 0.0558 and 0.051, respectively. In addition, DNN models have the highest R

^{2}values.

^{2}for them are relatively high and MAR is small. All analyses were performed in both MINITAB and WEKA environments on a laptop with an Intel (R) Core i5 processor and 4 GB of RAM.

## 4. Conclusions

^{2}among all models, and it has the lowest mean absolute residual. However, ANN takes more time for building and training the models compared to the others. Decision tree-based prediction algorithm has R

^{2}equals to 0.9 which is lower than ANN. The mean absolute residual of the decision tree model is lower than MLR and higher than ANN. The lowest R

^{2}value compared to the other is for multiple log-linear regression and it also has the higher MAR. However, with respect to the time taken to develop the model, DNN is very fast compared with ANN and DT. Broadly speaking, in the field of large power system, it is acceptable to have a few kilowatts errors in the forecast load since the total load is measured by megawatts or gigawatts, and it can been seen the differences between the MAR are relatively small. After conducting the Kruskal–Wallis nonparametric test, one can conclude that there is statistical significant difference between all the models at 5% level of significance. This work is also validated with stochastic time-series methods such as ARIMA and MC simulation which are very useful in short term prediction as well. This work can be applied to predict the micro-grid operation in power system by forecasting both renewable resources output and the existing demand output and making multiple relationships between the sources and demands. To sum up, machine learning algorithms and regression analysis provide an efficient and fairly accurate estimation for the power system demand.

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Nomenclature for the Abbreviations and Symbols

DNN | Deep neural network | FL | Fuzzy logic |

ANN | Artificial neural network | DR | Decision tree |

MAE | Mean absolute error | ID3 | Iterative Dichotomiser 3 |

R^{2} | Regression | C4.5 | Cervical segment (extension of ID3) |

h/hrs | Hours | CART | Classification and regression tree |

MW | Megawatts | M5 | Model tree |

MAVR | Megavolt ampere | AR | Autoregressive |

CANN | Cascaded ANN | MA | Moving average |

IESO | Independent electricity system operator | ARMA | Autoregressive–moving average |

HOEP | Hourly Ontario energy prices | ARIMA | AR integrated MA |

LY | Last year | ARFIMA | Fractional ARIMA |

PW | Previous week | SARIMA | Seasonal ARIMA |

P24Hr | 24 h | ARCH | AR conditional heteroscedasticity |

Temp | Temperature | GARCH | Generalized ARCH |

DT | Dew point temp. | EGARCH | Exponential GARCH |

Hum | Humidity | TAR | Threshold autoregressive |

WS | Wind speed | NAR | Nonlinear autoregressive NN |

AP | Air pressure | NMA | Neural multislot auction |

OTHEP | Ontario hourly energy price | AI | Artificial intelligence |

CS | Coefficient of skewness | ML | Machine learning |

CK | Coefficient of kurtosis | SVM | Support vector machine |

MLR | Multiple linear regression | ELM | Extreme learning machine |

LOO | Leave-one-out | PSO | Particle swarm optimization |

NN | Neural network | GA | Genetic algorithm |

CNN | Convolutional NN | ACO | Ant colony optimization |

RNN | Recurrent NN | MMRE | Mean magnitude relative error |

LSTM | Long short-term memory | MAR | Mean absolute residual |

MLP | Multilayer perceptron | LF | Load forecast |

w | Weight | λ | Bias |

## References

- Gönen, T. Electric Power Distribution System Engineering; McGraw-Hill: New York, NY, USA, 1986. [Google Scholar]
- Shahidehpour, M.; Yamin, H.; Li, Z. Market Operations in Electric Power Systems: Forecasting, Scheduling and Risk Management. Wiley Online Library. 2002. Available online: https://www.wiley.com/en-us/Market+Operations+in+Electric+Power+Systems:+Forecasting,+Scheduling,+and+Risk+Management-p-9780471443377#description-section (accessed on 5 August 2021).
- Feinberg, E.A.; Genethliou, D. Load forecasting. In Applied Mathematics for Restructured Electric Power Systems; Springer: Berlin/Heidelberg, Germany, 2005; pp. 269–285. [Google Scholar]
- Amral, N.; Özveren, C.; King, D. Short term load forecasting using multiple linear regression. In Proceedings of the 42nd International Universities Power Engineering Conference, 2007 (UPEC 2007), Brighton, UK, 4–6 September 2007; pp. 1192–1198. [Google Scholar]
- Papalexopoulos, A.D.; Hesterberg, T.C. A Regression-based approach to short-term system load forecasting. IEEE Trans. Power Syst.
**1990**, 5, 1535–1547. [Google Scholar] [CrossRef] - Charytoniuk, W.; Chen, M.-S.; van Olinda, P. Nonparametric regression based short-term load forecasting. IEEE Trans. Power Syst.
**1998**, 13, 725–730. [Google Scholar] [CrossRef] - Song, K.-B.; Baek, Y.-S.; Hong, D.H.; Jang, G. Short-term load forecasting for the holidays using fuzzy linear regression method. IEEE Trans. Power Syst.
**2005**, 20, 96–101. [Google Scholar] [CrossRef] - Heinemann, G.; Nordmian, D.; Plant, E. The relationship between summer weather and summer loads—A regression analysis. IEEE Trans. Power Appar. Syst.
**1966**, 11, 1144–1154. [Google Scholar] [CrossRef] - Hagan, M.T.; Behr, S.M. The time series approach to short term load forecasting. IEEE Trans. Power Syst.
**1987**, 2, 785–791. [Google Scholar] [CrossRef] - Al-Hamadi, H.; Soliman, S. Short-term electric load forecasting based on kalman filtering algorithm with moving window weather and load model. Electr. Power Syst. Res.
**2004**, 68, 47–59. [Google Scholar] [CrossRef] - Gupta, P.; Yamada, K. Adaptive short-term forecasting of hourly loads using weather information. IEEE Trans. Power Appar. Syst.
**1972**, 5, 2085–2094. [Google Scholar] [CrossRef] - Krogh, B.; de Llinas, E.; Lesser, D. Design and implementation of an on-line load forecasting algorithm. IEEE Trans. Power Appar. Syst.
**1982**, 9, 3284–3289. [Google Scholar] [CrossRef] - Park, D.C.; El-Sharkawi, M.; Marks, R.; Atlas, L.; Damborg, M. Electric load forecasting using an artificial neural network. IEEE Trans. Power Syst.
**1991**, 6, 442–449. [Google Scholar] [CrossRef] - Bakirtzis, A.G.; Petridis, V.; Kiartzis, S.; Alexiadis, M.C. A neural network short term load forecasting model for the greek power system. IEEE Trans. Power Syst.
**1996**, 11, 858–863. [Google Scholar] [CrossRef] - AlFuhaid, A.; El-Sayed, M.; Mahmoud, M. Cascaded artificial neural networks for short-term load forecasting. IEEE Trans. Power Syst.
**1997**, 12, 1524–1529. [Google Scholar] [CrossRef] - Bakirtzis, A.; Theocharis, J.; Kiartzis, S.; Satsios, K. Short term load forecasting using fuzzy neural networks. IEEE Trans. Power Syst.
**1995**, 10, 1518–1524. [Google Scholar] [CrossRef] - Daneshdoost, M.; Lotfalian, M.; Bumroonggit, G.; Ngoy, J. Neural network with fuzzy set-based classification for short-term load forecasting. IEEE Trans. Power Syst.
**1998**, 13, 1386–1391. [Google Scholar] [CrossRef] - Chen, S.-T.; Yu, D.C.; Moghaddamjo, A.R. Weather sensitive short-term load forecasting using nonfully connected artificial neural network. IEEE Trans. Power Syst.
**1992**, 7, 1098–1105. [Google Scholar] [CrossRef] - Czernichow, T.; Piras, A.; Imhof, K.; Caire, P.; Jaccard, Y.; Dorizzi, B.; Germond, A. Short term electrical load forecasting with artificial neural networks. Eng. Intell. Syst. Electr. Eng. Commun.
**1996**, 4, 85–99. [Google Scholar] - Drezga, I.; Rahman, S. Short-term load forecasting with local ann predictors. IEEE Trans. Power Syst.
**1996**, 14, 844–850. [Google Scholar] [CrossRef] - Ho, K.-L.; Hsu, Y.-Y.; Yang, C.-C. Short term load forecasting using a multilayer neural network with an adaptive learning algorithm. IEEE Trans. Power Syst.
**1992**, 7, 141–149. [Google Scholar] [CrossRef] - Ding, Q. Long-term load forecast using decision tree method. In Proceedings of the 2006 IEEE PES Power Systems Conference and Exposition (PSCE’06), Atlanta, GA, USA, 29 October 2006; pp. 1541–1543. [Google Scholar]
- Salgado, R.M.; Lemes, R.R. A hybrid approach to the load forecasting based on decision trees. J. Control. Autom. Electr. Syst.
**2013**, 24, 854–862. [Google Scholar] [CrossRef] - Stensrud, E.; Myrtveit, I. Human performance estimating with analogy and regression models: An empirical validation. In Proceedings of the Fifth International Software Metrics Symposium, Metrics, Bethesda, MD, USA, 20–21 November 1998; pp. 205–213. [Google Scholar]
- Malik, H.; Fatema, N.; Iqbal, A. Intelligent Data-Analytics for Condition Monitoring: Smart Grid Applications, 1st ed.; Elsevier: Amsterdam, The Netherlands, 2021; ISBN 978-0-323-85510-5. [Google Scholar] [CrossRef]
- Iqbal, A.; Malik, H.; Joshi, P.; Agrawal, S.; Bakhsh, F.I. Meta Heuristic and Evolutionary Computation: Algorithms and Applications, 1st ed.; Springer Nature: Berlin/Heidelberg, Germany, 2020; ISBN 978-981-15-7571-6. [Google Scholar] [CrossRef]
- Malik, H.; Chaudhary, G.; Srivastava, S. Digital transformation through advances in artificial intelligence and machine learning. J. Intell. Fuzzy Syst.
**2021**, 42, 615–622. [Google Scholar] [CrossRef] - Fatema, N.; Malik, H. Data-Driven Occupancy Detection Hybrid Model Using Particle Swarm Optimization Based Artificial Neural Network. In Metaheuristic and Evolutionary Computation: Algorithms and Applications; Studies in Computational Intelligence Series; Springer: Singapore, 2020; pp. 283–297. [Google Scholar] [CrossRef]
- Arora, P.; Malik, H.; Sharma, R. Wind Energy Forecasting Model for Northern-Western Region of India Using Decision Tree and MLP Neural Network Approach. Interdiscip. Environ. Rev.
**2018**, 19, 13–20. [Google Scholar] [CrossRef] - Fatema, N.; Malik, H.; Abd Halim, M.S. Hybrid Approach Combining EMD, ARIMA and Monte Carlo for Multi-Step Ahead Medical Tourism Forecasting. J. Intell. Fuzzy Syst.
**2022**, 42, 1235–1251. [Google Scholar] [CrossRef] - Malik, H.; Fatema, N.; Alzubi, J.A. AI and Machine Learning Paradigms for Health Monitoring System: Intelligent Data Analytics, 1st ed.; Springer Nature: Berlin/Heidelberg, Germany, 2021; 513p, ISBN 978-981-334-412-9. [Google Scholar]
- Srivastava, S.; Malik, H.; Sharma, R. Intelligent tools and techniques for signals, machines and automation. J. Intell. Fuzzy Syst.
**2018**, 35, 4895–4899. [Google Scholar] [CrossRef] - Saad, S.; Ishtiyaque, M.; Malik, H. Selection of Most Relevant Input Parameters Using WEKA for Artificial Neural Network Based Concrete Compressive Strength Prediction Model. In Proceedings of the 2016 IEEE 7th Power India International Conference (PIICON), Bikaner, India, 25–27 November 2016; pp. 1–6. [Google Scholar] [CrossRef]
- Quinlan, J.R. C4.5: Programs for Machine Learning. 1993. Available online: https://www.elsevier.com/books/c45/quinlan/978-0-08-050058-4 (accessed on 5 August 2021).
- Independent Electricity System Operator. Available online: http://www.ieso.ca/ (accessed on 8 January 2022).
- Canadian Climate Data-Environment Canada. Available online: http://climate.weather.gc.ca/ (accessed on 5 August 2021).
- Chen, H.; Canizares, C.A.; Singh, A. Ann-based short-term load forecasting in electricity markets. In Proceedings of the Power Engineering Society Winter Meeting, Columbus, OH, USA, 28 January–1 February 2001; pp. 411–415. [Google Scholar]
- Phstat Package. Available online: http://wps.aw.com/phstat/ (accessed on 30 November 2020).
- Dean, R.; Dixon, W. Simplified statistics for small numbers of observations. Anal. Chem.
**1951**, 23, 636–638. [Google Scholar] [CrossRef] - Malik, H.; Savita. Application of Artificial Neural Network for Long Term Wind Speed Prediction. In Proceedings of the 2016 Conference on Advances in Signal Processing (CASP), Pune, India, 9–11 June 2016; pp. 217–222. [Google Scholar] [CrossRef]
- Malik, H.; Ahmad, W.; Kothari, D.P. Intelligent Data-Analytics for Power and Energy Systems: Advances in Models and Applications, 1st ed.; Springer Nature: Berlin/Heidelberg, Germany, 2022; ISBN 978-981-16-6080-1. [Google Scholar]
- Yadav, A.K.; Malik, H.; Chandel, S.S. Application of Rapid Miner in ANN Based Prediction of Solar Radiation for Assessment of Solar Energy Resource Potential of 76 Sites in Northwestern India. Renew. Sustain. Energy Rev.
**2015**, 52, 1093–1106. [Google Scholar] [CrossRef]

**Figure 8.**The relationships between the hourly load and the independent variables LY, PW, PD, and P24Hr.

**Figure 9.**The modified LSTM along with standard LSTM architecture representation [25].

**Figure 14.**Comparison of per-hour forecast future time series using updated DNN model with test data (observed value).

**Figure 18.**Comparison of per-day forecast future time series using updated DNN model with test data (observed value).

**Figure 22.**Comparison of per-week forecast future time series using updated DNN model with test data (observed value).

Variable | Description—Type |
---|---|

Hourly Load | The estimated hourly load for the system (MW) |

LY | Last year load at the same time (MW) |

PW | Previous week load for the same time (MW) |

PD | Previous day load for the same time (MW) |

P24Hr | Average load for the 24 h prior to this time (MW) |

Temp | Outside temperature (°C) |

DT | Dew point temperature (°C) |

Hum | Real humidity (%) |

WS | Average wind speed (km/h) |

AP | Outside air pressure (kPa) |

OHEP | Ontario hourly energy price (cents/kwh) |

Variables | Statistical Information for Data | |||
---|---|---|---|---|

Min | Mean | Max | STD | |

Hourly load | 2387.356 | 3198.982 | 3937.756 | 396.3217 |

LY: Last year load at the same time (MW) | 2574.196 | 3359.433 | 4197.332 | 408.688 |

PW: Previous week load for the same time (MW) | 2473.032 | 3089.212 | 3807.772 | 329.1408 |

PD: Previous day load for the same time (MW) | 2387.356 | 3151.728 | 3937.756 | 395.8146 |

P24Hr: Average load for the 24 h prior to this time (MW) | 2912.799 | 3188.113 | 3351.651 | 149.6213 |

Temp: Outside temperature (°C) | 5.8 | 13.40905 | 22.9 | 3.995968 |

DT: Dew point temperature (°C) | 2.2 | 9.210553 | 15.9 | 4.57159 |

Hum: Real humidity (%) | 46 | 81.96985 | 99 | 12.01837 |

WS: Average wind speed (km/h) | 0 | 14.15578 | 35 | 6.852418 |

AP: Outside air pressure (kPa) | 98.94 | 100.0777 | 101.34 | 0.568973 |

OHEP: Ontario hourly energy price (cent/kwh) | 9.8 | 34.62302 | 103.39 | 12.51388 |

Type of Forecasting | Testing Phase Result Demonstration | |
---|---|---|

DNN Model | Updated DNN Model | |

Per-hour forecasting | 11.58186 | 4.08530 |

Per-day forecasting | 16.93268 | 4.22537 |

Per-week forecasting | 29.62043 | 15.00319 |

Rule No. | Rule Characteristics |
---|---|

1 | LY ≤ 2889, P24Hr ≤ 3039.3, Temp ≤ 18 |

2 | LY ≤ 2889, P24Hr ≤ 3039.3, Temp > 18 |

3 | LY ≤ 2889, P24Hr > 3039.3 |

4 | LY > 2889, AP ≤ 100, PD ≤ 2758.2 |

5 | LY > 2889, AP ≤ 100, PD > 2758.2 |

6 | LY > 2889, AP > 100, P24Hr ≤ 3017.2 |

7 | LY > 2889, AP > 100, P24Hr > 3017.2 |

8 | LY ≤ 3584, AP ≤ 99.9 |

9 | LY ≤ 3584, AP > 99.9 |

10 | LY > 3584, AP ≤ 100 |

11 | LY > 3584, AP > 100 |

12 | LY > 3742 |

Attributes/Rule No. | LY | PW | PD | P24Hr | Temp | DT | Hum | WS | AP | OHEP | Constant |
---|---|---|---|---|---|---|---|---|---|---|---|

1 | 0.58 | 0.17 | −0.26 | 0.19 | 16.53 | −7.14 | 5.91 | −0.91 | 11.24 | −1.77 | −1127.98 |

2 | 0.70 | 0.17 | −0.26 | 0.19 | 23.81 | −7.14 | 6.66 | −0.91 | 11.24 | −1.77 | −1588.60 |

3 | 0.75 | 0.17 | −0.26 | 0.19 | 17.57 | −7.14 | 3.67 | −0.91 | 11.24 | −2.80 | −1317.36 |

4 | 0.54 | 0.30 | −0.23 | −0.01 | 11.49 | −7.14 | — | −0.49 | 11.24 | −1.98 | −133.78 |

5 | 0.54 | 0.30 | −0.22 | 0.20 | 11.49 | −7.14 | — | −0.91 | 11.24 | −1.98 | −797.84 |

6 | 0.76 | 0.34 | −0.46 | 0.08 | 11.49 | −7.14 | — | −0.91 | 11.24 | −1.98 | −449.59 |

7 | 0.72 | 0.34 | −0.43 | 0.08 | 11.49 | −7.14 | — | −0.91 | 11.24 | −1.98 | −426.06 |

8 | 1.14 | 0.12 | −0.23 | −0.18 | 16.73 | −24.59 | 3.57 | −0.87 | −9.02 | −1.97 | 964.80 |

9 | 0.93 | 0.08 | −0.28 | −0.18 | 28.95 | −47.47 | 1.22 | −0.87 | 24.24 | −1.97 | −1053.00 |

10 | 0.54 | 0.03 | −0.21 | −0.22 | 11.68 | −18.37 | 0.72 | −0.87 | 28.96 | −9.37 | 289.99 |

11 | 0.54 | 0.03 | −0.43 | −0.22 | 11.68 | −18.37 | 0.72 | −0.87 | 28.96 | −6.18 | 937.13 |

12 | 1.06 | 0.03 | −0.34 | −0.22 | 10.35 | −16.88 | 0.72 | −1.48 | 29.61 | −0.39 | −1526.00 |

Model | R^{2} | MAR | Model Building Time | Training Time |
---|---|---|---|---|

DNN | 0.985 | 0.014 | 0.0002 s | 32–33 s |

ANN (1) | 0.958 | 0.0558 | 0.42 s | 1 min, 17 s |

ANN (2) | 0.966 | 0.051 | 0.42 s | 3 min, 13 s |

DR | 0.904 | 0.091 | 0.16 s | 15.2 s |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Alotaibi, M.A.
Machine Learning Approach for Short-Term Load Forecasting Using Deep Neural Network. *Energies* **2022**, *15*, 6261.
https://doi.org/10.3390/en15176261

**AMA Style**

Alotaibi MA.
Machine Learning Approach for Short-Term Load Forecasting Using Deep Neural Network. *Energies*. 2022; 15(17):6261.
https://doi.org/10.3390/en15176261

**Chicago/Turabian Style**

Alotaibi, Majed A.
2022. "Machine Learning Approach for Short-Term Load Forecasting Using Deep Neural Network" *Energies* 15, no. 17: 6261.
https://doi.org/10.3390/en15176261