Proceedings of the IASTED International Conference Modelling and Simulation (AfricaMS 2014) September 1 - 3, 2014 Gaborone, Botswana
UNDERSTANDING THE IMPACTS OF GDP AND POPULATION IN SOUTH AFRICA’S ENERGY CONSUMPTION 1*
1*
2
Oludolapo A. Olanrewaju, 2Josiah L. Munda, 3Adisa A. Jimoh
Centre for Energy and Electric Power, Tshwane University of Technology Pretoria, South Africa
[email protected]
Centre for Energy and Electric Power, Tshwane University of Technology Pretoria, South Africa
[email protected] 3
Electrical Engineering department, Tshwane University of Technology Pretoria, South Africa
[email protected]
ABSTRACT The objective of this paper is to develop a forecast model dependent on artificial neural network (ANN) to model South Africa’s energy consumption between 2002 and 2009 based on the input factors – gross domestic product (GDP) and population. To what significance does the country’s energy consumption depend on these input factors was also successfully analyzed. The paper employs ANN to carry out these various analyses successfully. In comparison to the regression analyses, it was discovered that ANN is a better modeling technique.
for a non-linear rather than linear relationship between energy consumption and economic growth [3, 4]. South Africa is one of those countries, moving from an apartheid regime to a democratically elected regime. In this present world, with increase in the population, the need for energy is important. Understanding the relationship between energy, GDP and population is important to predict energy baseline. The use of artificial intelligence in energy studies is on the increase. Applying artificial intelligence to a system needs sufficient input and output data instead of mathematical equation [5]. The best approach to examine a country’s energy consumption is to measure the consumption based on the country’s population and GDP. This is because the country’s energy consumed is due to the growth of the nation, both economical and humanly. Olanrewaju et al. [6] have utilized ANN model for predicting the energy usage in the industrial sector of South Africa between 1993 and 2000. The study looked at energy consumption under economic activity, GDP. Their results signified intense conformity between ANN model prediction and observed values compared to linear regression model. The study of Sozen and Arcaklioglu [7] was to obtain equations based on economic indicators (gross national product – GNP and GDP) and population increase to predict the net energy consumption of Turkey using ANNs in order to determine future level of the energy consumption and make true investments in Turkey. Based on the outputs of the study, the ANN model can be used to estimate the net energy consumption from the country’s population and economic indicators with high confidence for planning future projections. Traditionally, regression analysis has been the most popular modeling technique in predicting net energy consumption [7]. But the importance of ANN approach;
KEY WORDS Energy consumption, gross domestic product, population, ANN.
1. Introduction The use of energy is critical to the economy, because almost all economic activities are connected either directly or indirectly to the consumption of energy [1]. Today, the world faces a great challenge for saving their future in terms of providing one of the most necessary requirements of humankind: energy [2]. As a nation, South Africa is no exception. An energy model to determine a nation’s energy baseline will assist future energy, especially energy planners, researchers and policy makers. It is worth noting that most previous studies are limited in scope to the applications of linear models [3]. However economic events and regime changes such as changes in economic environment, changes in energy policy and fluctuations in energy prices can cause structure changes in the pattern of energy consumption for a given time period under study [3]. This creates a room
DOI: 10.2316/P.2014.813-016
132
an artificial intelligence, apart from reducing the time required, is that it is possible to make energy applications more viable and thus attractive to potential users, such as energy engineers [7]. The paper’s objective is to develop a forecast model dependent on ANN to model South Africa’s energy consumption between 2002 and 2009 based on GDP and population for energy planners and policymakers. One may judge a forecast successful if it (a) helps energy planners, (b) influence the energy policy community [8]. Wrong forecasts can lead to wrong decisions [9]. The inputs for the ANN used for this study are population and GDP, while energy consumed is the output. The influence of GDP and population on energy will also be determined as this will also assist in decision making.
2. Data Data employed were both from Statistics South Africa [10] and [11]. Table 1 presents the data for this study. Table 1 presents primary energy supply, excluding imports and electricity, including coal, crude oil, gas, hydro, nuclear, petroleum products, and renewable and waste. It should be noted that the decrease in population in the table below is due to author’s calculation which is the difference between birth-rate and death-rate within the periods of investigation.
Table 1: Data used for the study Year
GDP at 2005 constant price (R millions)
Population
Primary energy in Terajoules
2002 (Period 1)
1236270
1167622
8647126
2003 (Period 2)
1273129
1162612
8728384
2004 (Period 3)
1330390
1153924
7804789
2005 (Period 4)
1401067
1143062
7949201
2006 (Period 5)
1478492
1131306
7742673
2007 (Period 6)
1561076
1116931
7538066
2008 (Period 7)
1619738
1103281
6874635
2009 (Period 8)
1597860
1090567
6683347
3. Methodology
takes the form
y = a0 + a1 x1 + a2 x2 ....an xn
, and the
∧
The ANN method based on a multilayer perceptron model is employed for this study. The objective functional chosen for this problem is the mean square error (MSE) between the outputs from the neural network (observed energy consumption) and the target values (the predicted energy consumption). As the inputs are applied to the network, the network output is compared to the target. The architecture of this network consists of three layers namely the input, hidden and output layer, with each layer having one or more neurons, in addition to bias neurons connected to the hidden and output layers. The computational procedure of the network is given as:
Yi = f (∑ wij xij )
error
ei
is equal to
yi − yi , the variation between the a0 , a1 ,...an are the
actual and fitted values. Where
x1 , x2 ,...xn
regression coefficients and are the independent variables considered. Mean absolute percentage error (MAPE) and coefficient of correlation which are yardsticks of accuracy in a fitted series value in statistics were used for comparing the prediction performances of the models. MAPE usually expresses accuracy as a percentage
1 N MAPE = Ai
(1)
i
where Yj is the output of node j, ƒ(.) the transfer function, wij the connection weight between node j and node i in the lower layer and xi the input signal from the node i in the lower layer [12]. Comparing artificial network analyses to regression analyses; the regression equation
N
∑| i =1
Ai − Pi | X 100% Ai
where is the observed (Actual) value and predicted value.
133
(2)
Pi
is the
3.1 Network Design using MATLAB
With Imp (i) indicating the comparative significance of factor i; n representing hidden nodes’ number; x represents hidden node’s index number; CWih(x) signifies connectivity weight between input factor i and hidden node x; CWho(x) signifies weight between hidden node x and the output node. This section quantifies the driving factors, liable to the South Africa’s energy consumption between the periods of 2002 and 2009. Input 1 represents GDP and input 2 represents population.
Newff is a Matlab code which creates a feed-forward backpropagation network. This was used to calculate a precise function of the MLP neural network. The number of hidden neurons was determined by comparing the performance of different cross-validated networks, with 1 – 12 hidden neurons, and choosing the number that produced the greatest network performance. This resulted in a network with two input neurons (GDP and population), five hidden neurons and a single output neuron (primary energy consumption). The five hidden neurons process the inputs via connection weights and links the inputs to the output layer. In the analyses, network parameters of learning rate and momentum were set at 0.05 and 0.7, respectively. A variable learning rate with momentum (trainlm) as the network’s training function, and tansig as activation functions for all layers was used. The data used by the network must be scaled for the network to be effectual. In theory the inputs to the network can be any value. However, scaling values to the same order of magnitude (generally in the range 0 to 1 or -1 to 1) enables the network to learn relationships more quickly [13]. In this paper, the data were scaled to the range -1 to 1 to ensure a consistent scaling regime for input and output. Half of the data was used to train the network; those are for years 2002, 2004, 2006 and 2008. Data for the years 2003 and 2007 were used for testing and data for years 2005 and 2009 for validation. The Matlab code for the design is given in appendix section.
Table 2: Connection weight approach Hidden 1
Hidden 2
Hidden 3
Hidden 4
Hidden 5
Input 1
-2.8206
-0.6695
2.3620
1.7921
3.6704
Input 2
1.4634
-3.6151
2.4999
3.0804
0.6324
0.5581
-1.1889
X Output
0.6529
0.2133
-0.6170 =
Input 1
-1.84156
-0.1428
-1.45735
1.00017
-4.3637
Input 2
0.95545
-0.7711
-1.54243
1.71917
-0.7518
5
input x = ∑ Hidden
3.2 Regression Analysis using MATLAB
y =1
Matlab program was written for the regression analysis. The Matlab code is given at the appendix section. This leads to the following equation: y = -215.1524x105 + 0.154x105x1 + 25.6160x105x2
3.3 Determining the significance of the input factors The method for assessing and evaluating the variable components in the neural network in our investigation is the connection weight approach. The method adds the product of the weight of the connection from input neuron to the hidden neurons with the weight of the connection from the hidden neurons to the output neurons for all input parameters [14, 15]. As the sum of the connection weights gets larger, the more the significance of the parameter linked to the input neuron. Table 1 shows the greenhouse gas variables. The comparative significance of input factor i is estimated along the ensuing equation [15]: Imp (i) = ∑nx=1(CWih(x) CWho(x))
Significance
Rank
Input 1(GDP)
-6.8052
2
Input 2(Population)
-0.3907
1
4. Results and Discussions Computer codes for ANN-MLP model and regression were developed in Matlab Software (version 2010a). The MLP-model was trained until the best performance was achieved. In order to test and validate the model, a statistical test (the correlation coefficient R2) between the observed and the predicted primary energy consumption data using the MLP network was carried out. From the simulation carried out, it was found that better performance was delivered by the MLP-model according
(3)
134
to the correlation coefficient between both sets of data (observed and predicted). The obtained R2 is 0.9405, higher than the corresponding regression model of 0.9119, even though they are both good prediction models for the analyses. MAPE for the ANN-MLP model also confirmed its superiority to the regression analysis. MAPE for ANNMLP model is 0.0019, less than the regression of 0.0240. Regression analysis is a likely confirmation approach to ANN between the predicted and observed primary energy consumption values. The analysis should lead to a line y =a +bx with a correlation coefficient R2. A perfect prediction gives b = 1and R2 = 1.
90
E n e rg y C o n s u m p tio n
80
75
70
65 1
4
5
6
7
8
Figure 3: Regression analysis between the predicted and actual energy consumption.
6
5. Conclusion actual predicted
Examining a country’s energy consumption and the effects of its factors will help build a sustainable nation. As such, modeling plays a pivoted role in this regard. Establishing accurately the relationship between South Africa’s energy consumption, GDP and population; ANN model was employed, comparing it to its regression counterpart. The observed annual energy consumption and the predicted MLP-ANN energy consumption was validated using regression analysis. The result of the statistical measure: coefficient of correlation and MAPE suggest that ANN model provides accurate results than the traditional regression model. Another important outcome of the analyses suggests that behavioral policies should be promoted to help shape the country’s energy sector in a sustainable manner.
8.5 E n e r g y o n s u m p tio n
3
Figure 2: Comparison between actual and predicted energy consumption using regression analysis.
x 10
8
7.5
7
6.5 1
2
Periods
With the ANN conducted, it gives an appropriate prediction with b=1 and R2= 0.9990. It should be noted that b is 1 and R2 can be approximated to 1 respectively. Figures 1 and 2 demonstrate the prediction results of both models, while Figure 3 confirms the regression analysis on the ANN-MLP model for its validation. In our study, ANN model has been employed to predict South Africa’s primary energy consumption. This study gives a realistic result where energy is concerned because of the population factor considered as opposed to the study of Sozen, A. and E. Arcaklioglu (2007) where it’s only the GDP that was considered. Policy and decision making towards a country’s energy consumption requires awareness to the degree of significance of the comparative causal factors. With regard to the outcome of the ANN employed, the country’s population has more effect on the energy consumed in comparison to the country’s GDP. This result would give a clue to policymakers on behavioral policies that can assist to shape the country’s energy sector. 9
predicted actual
85
2
3
4
5
6
7
8
Periods
Figure 1: Comparison between actual and predicted energy consumption using MLP-ANN model.
135
sst=norm(t-mean(t))^2 ssr=sst-sse rsquared=ssr/sst net.iw{1,1} net.lw{2,1}
Appendix ANN Matlab code p= [1236270 1273129 1330390 1401067 1478492 1561076 1619738 1597860; 1167622 1162612 1153924 1143062 1131306 1116931 1103281 1090567]; t= [8647126 8728384 7804789 794201 7742673 7538066 6874635 6683347]; [pn,minp,maxp,tn,mint,maxt] = premnmx(p,t); iitst = 2:4:Q; iival = 4:4:Q; iitr = [1:4:Q 3:4:Q]; val.P = pn(:,iival); val.T = tn(:,iival); test.P = pn(:,iitst); test.T = tn(:,iitst); ptr =pn(:,iitr); ttr = tn(:,iitr); net = newff(minmax(ptr),[5 1],{'tansig' 'tansig'},'trainlm'); net.trainParam.show=50; net.trainParam.lr=0.05; net.trainParam.mc=0.7; [net,tr]=train(net,ptr,ttr,[],[],val,test); an=sim(net,pn); a = postmnmx(an,mint,maxt); error=(t-a) sse=norm(error)^2
Regression Matlab code y= [8647126 8728384 7804789 7949201 7742673 7538066 6874635 6683347]'; x1=[1236270 1273129 1330390 1561076 1619738 1597860]'; x2=[1167622 1162612 1153924 1116931 1103281 1090567]'; X=[ones(size(x1)) x1 x2]; a=X\y Y=X*a Err=(y-Y) sse=norm(Err)^2 sst=norm(y-mean(y))^2 ssr=sst-sse rsquared=ssr/sst
1401067
1478492
1143062
1131306
[8] Bhattacharyya, S.C., ed. Energy Economics. Concepts, Issues, Markets and Governance. 2011, Springer-Verlog London Limited. [9] Kallrath, J., P.M. Pardalos, S. Rebennack, and M. Scheidt, Optimization in the Energy Industry. 2009, Springer. [10] Statistics South Africa. National Accounts. Environmental Economic Accounts. Energy Accounts for South Africa: 2002-2009. January 2012. [11] Statistics South Africa. Mid-year population etimates 2011. July 2011. [12] Hsu, C.-C. and C.-Y. Chen, Regional load forecasting in Taiwan-applications of artificial neural networks. Energy conversion and Management, 2003. 44: p. 1941-1949. [13] Hart, A., Using neural networks for classification tasks - some experiments on datasets and practical advice. J.Opl. Res. Soc., 1992. 43: p. 215 - 226. [14] Olden, J.D., M.K. Joy, and R.G. Death, An accurate comparison of methods for quantifying variable importance in artificial neural networks using simulated data. Ecological Modelling, 2004. 178: p. 389 - 397. [15] Kemp, S.J., P. Zaradic, and F. Hansen, An approach for determining relative input parameter importance and significance in artificial neural netorks. Ecological Modelling, 2007. 204: p. 326-334.
References [1] Statistics South Africa. Natural resource accounts. Energy accounts for South Africa, 1995-2001. April 2005. [2] Erdinc, O. and M. Uzunoglu, Optimum design of hybrid renewable energy systems: overview of different approaches. Renewable and Sustainable Energy Reviews, 2012. 16: p. 1412-1425. [3] Chiou-Wei, S.Z., C.-F. Chen, and Z. Zhu, Economic growth and energy consumption revisited - Evidence from linear and non-linear Granger causality. Energy Economics, 2008. 30: p. 3063-3076. [4] Lee, C.C. and C.P. Chang, Structural breaks, energy consumption, and economic growth revisited: evidence from Taiwan. Energy Economics, 2005. 27: p. 857-872. [5] Amir Heydari, K. Shayesteh, and L. Kamalzadeh, Prediction of Hydrate formation temperature for natural gas using artificial neural network. Oil and Gas Business, 2006. [6] Olanrewaju, O.A., A.A. Jimoh, and P.A. Kholopane. Linear Regression and Artificial Neural Network models for prediction of Energy Consumption in South Africa. in SAUPEC Conference. 2011. Capetown. [7] Sozen, A. and E. Arcaklioglu, Prediction of net energy consumption based on economic indicators (GNP and GDP) in Turkey. Energy Policy, 2007. 35: p. 4981-4992.
136