FORECASTING HOUSEHOLD
ELECTRICITY DEMAND USING
MACHINE LEARNING ALGORITHMS
A CASE OF THAILAND
Nattapong Puttanapong
Faculty of Economics, Thammasat University
The 2nd International Conference on Energy and AI
Aug 9-13, 2021
Imperial College London, UK
Page 1
Main contents
(1) Introduction
(2) Literature review
(3) Methodology and data
(4) Result discussion
(5) Conclusion
Page 2
(1) Introduction
• Because electricity generation is generally a long-term
operation requiring large capital investment, the
accurate projection on future electricity demand is
inevitably a crucial factor.
• To smoothly sustain the economic growth, the Thai
government has recognized the significance of long-term
planning enabling sufficient and efficient electricity
generation.
• Therefore, the national Power Development Plan
(hereafter referred to as "PDP") has been regularly
formulated since 1992.
Page 3
(1) Introduction (cont’d)
• Specifically, load forecasting and the stability of the power
system are the main deliverables of PDP.
• In addition, household electricity consumption is one of
the main components of electrical load.
• However, the load forecast error has been a serious
concern.
• In November 2020, it caused the power generation reserve
to reach 50% of total power generation capacity,
substantially higher than the internationally recommended
rate of 15-20%.
Page 4
Electricity Consumption
GWh
100,000
90,000
80,000
70,000
60,000
50,000
40,000
30,000
20,000
10,000
Residential Business Industrial Government and Non-Profit Agriculture
Source: http://www.eppo.go.th/index.php/en/en-energystatistics/electricity-statistic
Page 5
Actual vs. Forecast: Peak Electricity Demand (MW)
Electricity demand (MW)
Source: Kansuntisukmongkol (2018) Page 6
Actual vs. Forecast: Annual Electricity Generation (GWh)
Annual Electricity Generation (GWh)
Source: Kansuntisukmongkol (2018) Page 7
Electricity Consumption
GWh
200,000
180,000
160,000
140,000
120,000
100,000
80,000
60,000
40,000
20,000
0
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Source: http://www.eppo.go.th/index.php/en/en-energystatistics/electricity-statistic
Page 8
Main motivations
(1) Thailand’s PDP has used the top-down approach. This
study aims at applying alternative approach of forecasting
electricity demand, the bottom-up forecast estimated from
household’s characteristics. The electricity demand should
be forecasted by using both approaches [1].
(2) To seek new method to correct the forecast
discrepancy of Thailand’s PDP [2].
(3) To incorporate social science aspects into electricity
demand forecast [3].
Page 9
(2) Literature review
Publications applied the similar methods to examine the
factors determining the electricity demand.
• England [4]
• Ireland [5] [6] [7] [8]
• Austin, Texas [9]
• Perth, Western Australia [10]
• Japan [11]
• Europe [12]
• Denmark [13]
• Portugal [14] [15]
Page 10
(3) Data and methodology
SocioEconomic Survey (SES)
• Officially produced by the Thailand’s National Statistical Office (NSO)
• Data of 2006, 2007, 2009, 2011, 2013 and 2015 were used in this study.
Each sampling includes
• monthly average household’s electricity consumption (kWh)
• monthly average income (Thai baht)
• average temperature (degrees Celsius)
• numbers of possessed electrical appliances classified into 15 categories.
• number of family members
• owned vehicles
• number of rooms
• classification of building materials of the house.
2006 2007 2009 2011 2013 2015
No. of samples 41,814 40,337 28,362 28,408 38,079 37,008
No. of variables 10 10 10 10 34 36
Page 11
(3) Data and methodology (cont’d)
• Generalized least squares (GLS) regression
• Artificial Neural Network (ANN)
• Random Forest (RF)
• Support Vector Regression (SVR)
R packages used in Machine Learning computation
Method Package’s name Technical reference
Neural Network (NN) nnet https://cran.r-project.org/web/packages/nnet/nnet.pdf
Random Forest (RF) randomForestSRC https://cran.r-project.org/web/ packages/randomForestSRC/
randomForestSRC.pdf
Support Vector Regression (SVR) e1071 https://cran.r-project.org/web/ packages/e1071/e1071.pdf
• The 100-fold resampling computational technique was applied to the dataset,
and the values of root-mean-square error (RMSE) obtained from four machine
learning algorithms were compared.
• In addition, RF incorporated the analyses of variable importance (VIMP) and
minimal depth (MD), quantifying each factor's degree of influence on electricity
consumption.
Page 12
(3) Data and methodology (cont’d)
Examples of structure of ANN models
2015
2009
Page 13
(4) Result discussion
0.0900
0.0800
0.0700
0.0600
0.0500
0.0400
0.0300
0.0200
0.0100
-
2006 2007 2009 2011 2013 2015
GLS ANN RF SVR
RF yielded the lowest RMSE, while those of SVR, ANN and GLS ranked second, third
and fourth, respectively.
Page 14
Predicted Values
Predicted Values
2006 2007
Actual Values Actual Values
Predicted Values
Predicted Values
2009 2011
Actual Values
Actual Values Predicted Values
Predicted Values
2013 2015
Actual Values Actual Values Page 15
(4) Result Discussion (cont’d)
R-squared (R2) – Random Forest
0.9000
0.8784
0.8718
0.8500
0.8000
0.7746 0.7757
0.7646
0.7500 0.7431
0.7000
0.6500
2006 2007 2009 2011 2013 2015
Page 16
(4) Result discussion (cont’d)
• With unique characteristics of socioeconomic survey
data composed of a diverse combination of discrete
and continuous variables, all obtained results indicate
that RF is the most appropriate technique.
• Variable Importance (VIMP) and Minimal Depth (MD)
outcomes show that the ownership of air conditioners,
the average temperature, the monthly average income
and the number of family members are the most
influential factors.
Page 17
(4) Result Discussion (cont’d)
Variable Importance (VIMP) Variable Importance (VIMP)
2006 2007
Variable Importance (VIMP) Variable Importance (VIMP)
2009 2011
Variable Importance (VIMP) Variable Importance (VIMP)
2013 2015
Page 18
(4) Result Discussion (cont’d)
2006 2007
Variable Minimal Depth Variable Minimal Depth
income 1.165 income 1.187
air_con 1.242 air_con 1.290
washmach 2.017 washmach 1.961
refrig 2.068 refrig 2.126
tv_col 2.211 tv_col 2.255
Temp_Avg 2.452 Temp_Avg 2.437
No_member 2.743 No_member 2.701
elc_pot 3.100 3.061
elc_pot
dwelling 3.669 3.599
dwelling
2009 2011
Variable Minimal Depth Variable Minimal Depth
air_con 1.099 1.017
air_con
income 1.366 1.396
income
tv_col 1.820 1.900
tv_col
refrig 2.008 2.066
refrig
No_member 2.334 2.220
No_member
Temp_Avg 2.426 2.373
washmach
washmach 2.797 2.452
Temp_Avg
elc_pot 3.610 3.690
elc_pot
dwelling 3.878 3.905
dwelling
Page 19
2013 2015
Variable Minimal Depth
Variable Minimal Depth
1.073 air_con 0.977
air_con
1.290 expenditure 1.305
expenditure
2.150 income 2.104
income
3.021 cooking 2.920
mobile
3.220 mobile 3.028
No_member
3.229 No_member 3.089
Temp_Avg
3.257 Temp_Avg 3.126
Tel
3.321 elc_fan 3.241
elc_fan
3.391 Micw 3.749
cooking
3.432 gas_cook 4.291
refrig
3.920 Tel 4.307
gas_cook
4.166 bed 4.336
Micw
4.268 no_bedroom 4.683
washmach
4.623 refrig 4.790
no_fluo
4.794 washmach 4.794
bed
5.099 automobile 5.171
no_bedroom
5.105 no_fluo 5.217
comp
5.120 dwelling 5.328
dwelling
5.238 age 5.438
automobile
5.280 edu 5.570
age
5.480 motorcy 5.590
w_boiler
5.542 elc_iron 5.625
no_comflu
5.683 comp 5.654
video
5.741 no_room 5.669
no_room
5.747 no_bulb 5.803
motorcy
5.857 video 6.036
elc_iron
5.860 elc_pot 6.079
elc_cook_pot
5.932 no_comflu 6.111
elc_pot
6.114 w_boiler 6.135
no_bulb
6.152 radio 6.160
bicycle
6.269 bicycle 6.164
radio
6.870 build_b 6.457
build_b
6.883 elc_cook_pot 6.549
elc_cook
area 6.702
Page 20
(4) Result Discussion (cont’d)
The results obtained from both VIMP and MD are similar to main findings
identified in previous publications [5] [8] [10] [12] [14].
Heating ventilating and air conditioning (HVAC)
Household size
Dwelling size
Income
Floor area
Employment status/occupancy
Education
Rural vs. urban housing
Ownership structure/Dwelling type
Page 21
(5) Conclusion
• These outcomes also suggest the potential application
of using RF as a bottom-up approach for residential
load forecasting, which is the alternative to the top-down
one conventionally used in PDP.
• In addition, this proposed bottom-up technique can
indicate the electricity demand in the spatial dimension,
supporting the planning of distribution networks with
high accuracy
Page 22
(5) Conclusion (cont’d)
Future analyses
• Obtaining data from smart meter and applying time-series methods [16]
[17] [18] [19] [20]
• Applying Mean SHAP (SHapley Additive exPlanations) and Permutation
feature importance techniques [21] to extend the investigation on
causality.
Future policies
Dynamic tariffs [8]
Inclined Block Rates (a higher consumed power increases the marginal electricity
price)
Time of Use tariffs (a tariff depends on the periods of the day)
Real Time Pricing (an electricity price is determined by the real-time condition of
wholesale market).
Page 23
Thank you
[email protected]
Page 24
Reference
[1] B. Yildiz, J. Bilbao, J. Dore and A. Sproul, “Recent advances in the analysis of residential electricity consumption
and applications of smart meter data,” Applied Energy, vol. 208, pp. 402-427, 2017.
[2] C. Kansuntisukmongkol , “Trends and Disruptions in Energy Sector,” Conference Proceedings -- Thammasat
Annual Academic Conference 2018, pp. 330-388, 2018.
[3] G. I. Rochlin, “Energy research and the contributions of the social sciences: A retrospective examination,” Energy
Research and Social Science , vol. 3, pp. 178-185, 2014.
[4] P. Wyatt, “A dwelling-level investigation into the physical and socio-economic drivers of domestic energy
consumption in England,” Energy Policy, vol. 60, pp. 540-549, 2013.
[5] F. Wang, K. Li, N. Duić, Z. Mi, B.-M. Hodge, M. Shafie-khah and J. P. Catalão, “Association rule mining based
quantitative analysis approach of household characteristics impacts on residential electricity consumption patterns,”
Energy Conversion and Management, vol. 171, pp. 839-854, 2018.
[6] F. McLoughlin, A. Duffy and M. Conlon, “Characterising domestic electricity consumption patterns by dwelling and
occupant socio-economic variables: An Irish case study,” Energy and Buildings, vol. 48, pp. 240-248, 2012.
[7] X. Tong, R. Li, F. Li and C. Kang, “Cross-domain feature selection and coding for household energy,” Energy, vol.
107, pp. 9-16, 2016.
[8] C. Beckel, L. Sadamori, T. Staake and S. Santini, “Revealing household characteristics from smart meter data,”
Energy, vol. 78, pp. 397-410, 2014.
[9] J. D. Rhodes, W. J. Cole, C. R. Upshaw, T. F. Edgar and M. E. Webber, “Clustering analysis of residential electricity
demand profiles,” Applied Energy, vol. 135, pp. 461-471, 2014.
[10] P. Esmaeilimoakher, T. Urmee, T. Pryor and G. Baverstock, “Identifying the determinants of residential electricity
consumption for social housing in Perth, Western Australia,” Energy and Buildings, vol. 133, pp. 403-413, 2016.
Page 25
Reference (Cont’d)
[11] A. Ozawa, R. Furusato and Y. Yoshida, “Determining the relationship between a household’s lifestyle and its
electricity consumption in Japan by analyzing measured electric load profiles,” Energy and Buildings, vol. 119, pp. 200-
210, 2016.
[12] M. Hayn, V. Bertsch and W. Fichtner, “Electricity load profiles in Europe: The importance of household,” Energy
Research and Social Science, vol. 3, pp. 30-45, 2014.
[13] F. Andersen, H. Larsen and T. Boomsma, “Long-term forecasting of hourly electricity load: Identification of
consumption profiles and segmentation of customers,” Energy Conversion and Management, vol. 68, pp. 244-252, 2013.
[14] J. P. Gouveia and J. Seixas, “Unraveling electricity consumption profiles in households through clusters: Combining
smart meters and door-to-door surveys,” Energy and Buildings, vol. 116, pp. 666-676, 2016.
[15] V. Figueiredo, F. Rodrigues, Z. Vale and J. B. Gouveia, “An Electric Energy Consumer Characterization Framework
Based on Data Mining Techniques,” IEEE TRANSACTIONS ON POWER SYSTEMS, vol. 20, pp. 596-602, 2005.
[16] S. Haben, C. Singleton and P. Grindrod, “Analysis and Clustering of Residential Customers Energy Behavioral
Demand Using Smart Meter Data,” IEEE Transactions on Smart Grid, vol. 7, 2015.
[17] S. Singh and A. Yassine, “Big Data Mining of Energy Time Series for Behavioral Analytics and Energy Consumption
Forecasting,” Energies, vol. 11, p. 452, 2018.
[18] F. McLoughlin, A. Duffy and M. Conlon, “Evaluation of time series techniques to characterise domestic electricity
demand,” Energy, vol. 50, pp. 120-130, 2013.
[19] G. Chicco, “Overview and performance assessment of the clustering methods for electrical load pattern grouping,”
Energy, vol. 42, pp. 68-80, 2012.
[20] J. Kwac, J. Flora and R. Rajagopal, “Household Energy Consumption Segmentation Using Hourly Data,” IEEE
Transactions on Smart Grid, vol. 5,, pp. 420-429, 2014.
[21] I. Antonopoulos, V. Robu, B. Couraud and D. Flynn, “Data-driven modelling of energy demand response behaviour
based on a large-scale residential trial,” Energy and AI, vol. 4, p.100071, 2021.
Page 26