You are on page 1of 6

Development of Artificial Neural Network Models to Predict Daily Gas Consumption

Ronald H. Brown and Iftekhar Matin


Department of Electrical and Computer Engineering Marquette University, Milwaukee, WI 53201- 1881
Abstract The development of feed-forward artificial neural network (ANN) models to predict daily gas calnsumption is the subject of this paper. A methodology based on network sensitivities and intuition is discussed. The methodology is applied to two regions in Wisconsin served by the Wisconsin Gas Company (WGC). Training results show that ANN models reduce prediction root mean squared errors by more than half when compared with linear regression models. The ANN predictions are compared with predictionsmade by WGC gas controllers for the 18rst 97 days of the 1994-1995 heating season. The ANN prediction errors are 82.2% and 69.7% of the WGC estimate errors for the two regions.

2. FACTORS CONTRIBUTING TO GAS CONSUMPTION

1. INTRODUCTION ANDOVERVIEiW

Local gas companies face many challenges in the business of supplying gas to their customers while encouraging their customers to participate in conservation efforts. One such challenge is forecasting total daily gas consumption (known as daily sendout) for a given region. Daily, each local distribution company (LDC) notifies their pipeline company of the amount of gas the LDC will use the next gas day. When the errors in this estimate exceed certain limits, the LDC can be: penalized. Two significant sources of error in gas consumption predictions are errors in the weather forecast and errors in the mathematical model. The focus of this work is directly on the latter source of error. An increase in the number of variables, and the usage of nonlinear relationships between predicted sendouts, independent variables, and behavioral aspects of consumption, result in improved prediction models that can also reduce the effect of the former source of error. Models based on feedforward artificial neural networks (ANN) are perfect, because ANNs can model any nonlinearities. Initial results indicate that ANN models have training set root mean squared errors (RMSE) that are as low as 48% of the RMSE of linear regression models using the same inputs, and are well under 50% of the RMSE of mathematical models typically used by the LDCs today. ANN models for two regions in Wisconsin are now being used daily. The ANN predictions are being compared to the predictions being made independently by WGC gas controllers. The model prediction RMSE over the first 97 test days of the 1994-1995 heating season is 82.2% and 69.7% of the WGC prediction RMSE for the two regions.

Gas consumption depends on many factors. The most significant factor is temperature, as most gas is used for residential, commercial, and industrial heating. The scaled gas consumption for a region in metropolitan Milwaukee, WI, and the average daily temperature of Milwaukee, WI, are shown in Figure 1. (The gas consumption has been scaled to be in the range from 0 to loo0 units to protect proprietary information.) Another important factor is wind, because buildings lose more heat on a windy day than on a calm day. Heat loss is also a dynamic process. Therefore, weather characteristics from previous days are contributing factors to predicting gas consumption. Many industrial customers and some commercial customers shut down over weekends. Thus, the day of the week is also important. Many other potential factors exist, such as hours of sunshine, direction of the wind, tap water temperature, accounting for holidays, bill shock, etc. The most obvious characteristic that can be seen from Figure 1 (and is common knowledge) is gas consumption decreases with increasing temperature to a point. When the outside temperature reaches a certain range, heating no longer takes place and gas consumption is at some near constant baseline value. This nonlinear characteristic was observed long ago and defined the heating degree day as:

Weather for Milwaukee.WI

100,
80

f
L

60

40

20

0
-20' 89
I

90

91

92 year

93

94

95

I 96

Natural Gas Usage for Milwaukee,WI


1000

I
800

P 8

600

400
200 O s 9

90

91

92 year

93

94

95

96

This work was supported in part by a grant from the Wisconsin Center for Demand-Side Research.

Figure 1. Scaled daily sendout and average temperaturefor Milwaukee,WI

0-7803-3026-9195 $4.00 0 1995 IEEE

1389

HDD

max(0, T,

-T )

wind(k+l),the forecasted wind in mph for the next day; wind(k),the forecasted wind for the current day; wind(k-I),the forecasted wind for the previous day;

where T is the average temperature for a day and T, is the reference temperature, historically set to 65F. By using a set reference temperature as an intercept point, however, the nonlinear aspect of the outside temperature range is ignored. This is a source of prediction model error that must be addressed if the prediction model is to be improved. Similarly, all other contributing factors mentioned above must also be allowed to vary nonlinearly with respect to gas consumption.

wind(k-2),the actual wind for day before yesterday; SO(k-2),the actual sendout for the day before yesterday; sdayofweek, the sine of 27t times the day-of-the-week,

where Sat=O, Sun=l, -, Fri=6;


cdayojiveek, the cosine of 27c times the day-of-the-week,

where Sat=O, Sun=l, -, Fri=6. SELECTION ANDTHE TRAINING PROCESS 3. THE FACTOR Many A s were trained using various inputs. Daily consumption for the current day and the next day were the outputs. This was done in order to determine which factors were the most significant. The analysis of the models are presented in this section. In order to ascertain which factors are most important (and how well the network was trained), the input sensitivity of the ANN was determined. This was accomplished by adding offsets from -5% to +5% of full range to each input (one at a time), and measuring the change in the outputs. 5% of full range is denoted as 5%FR.This is shown in Figure 2. Ideally, the minimum error should occur when no offset is added to the input. That is not so in Figure 2. Thus, the ANN is not ideally trained. More training will reduce the training set error, but may lead to other problems (such as overtraining). The sensitivity to +/-5%FR input variation was calculated as the average of the +5%FR and the -5%FR input sensitivity. The results are shown in Figure 3. As expected, the HDD factor for the current day is most important, followed by SO(k2 ) and dd(k-2). The latter two factors together form an indicator of the current state of the system, i.e. thermostat settings, occupancy rate, etc. The lagged HDD is next most important. It indicates the dynamic behavior of the system. The weather factors for day k+I are not that important. This indicates that the system is causal. Weather factors for k+I are
train set sensitivity 25 i

A note on how error is measured: the root mean square error is measured as:

where e, is the I-th of N estimates, std is the error standard deviation, and the mean is the mean estimate error. The RMSE reported in this paper is calculated on scaled data with peak sendout set to 1000.

A, An 11-input ANN for the 1993-1994 Heating Season

An 1I-input ANN that achieved a RMSE of 17.67,68% of the linear regression RMSE of 25.26 using the same factors was trained in 51 epochs using an extended Kalman filter based algorithm [ 11. This network was trained on WGC SEW data in the Fall of 1993 for predicting gas consumption for the 19931994 heating season. The problem is to predict sendout for today and tomorrow. These days are denoted with the scripts k and k+l respectively. The prediction is done slightly before today
starts.

M m M -MKE -MKE -MKE W M -MKE m M

K K

K K

k dd(k+l) E dd(k) dd(k-1) dd(k-2) wind(k+l) E wind(k) wind(k-1) E wind(k-2)

w 15f In

z i
r

--SO(k-2)
-sdayofweek -cdayofweek

Thus actual factors for yesterday, scripted k - I , are not

yet known. The inputs were:


dd(k+l), the forecasted HDDs for the next day; dd(k),the forecasted HDDs for the current day; dd(k-1),the forecasted HDDs for the previous day; dd(k-2),the actual HDDs for day before yesterday;
ANN
-5

-6

-4

-2 percent change in input

Figure 2 Training set sensitivities for +/- 5% FS variation for the 1 1-input

1390

sensitivity to +/-5%FS input variation RMSE by Month

Mean Error by Month

Figure 3. Training set sensitivities in rank order for the 11-input ANN.

actually very important to predict the sendout for day k + l .

B. A 20-input ANN for the 1993-1994 Heating Season


Further study of the 11-input ANN indicates that the network has a tendency of under-predicting in the Fall and over-predicting in the Spring. This is explained as a behaviorad factor, that is, in general, people turn down their thermostats as the heating season progresses. Thus we hypothesized that day-of-the-yearindicators were needed. Furthermore, when the gas coinsumption over a year is studied, it has the appearance of a half-waved rectified sine wave with a period of one year. The Fourier series of a halfwave sine wave contains a fundamental antd even harmonic terms. Using Fourier analysis and linear regression, we determined that using the fundamental and second harmonic terms would significantlyreduce the error. We included these indicator variables into a ANN. To further reduce the RMSE, we hypothesized that weather and consumption for the same day of the previous week would be good factors.
A 20-input ANN was trained using a neuron decoupled extended Kalman filter based algorithm [2] on data for the WGC

Figwe 4. The 20-input ANN and equivalent LK model training characteristics (a) RMSE for each month (b) mean error for each month

ANN (except using heating degree days (HDDs) instead of temperatures). The LR model RMSE was 23.14, compared to 11.08 for the ANN. Thus the ANN training error was 48.2% of the LR training error.

Figure 4a shows the RMSE error for each month in the training set for both the ANN and the LR models. The ANN
Table 1. ANN. The Training Set and Testing Set Results of the WGC 20-in~ut Training Data Dates: 21-Dec-89 to 31-May-93 Testing Data Dates: 01-Jun-93to 29-Mar-94
RMSEforSO(k)(peak =1000)
~~~~

SEW region. This network also used temperature in degrees Fahrenheit instead of HDDs, since the actual nonlinearity can be modeled better by the network than by equation (1). The RMSE for this network was 11.08. The training set data contained one training vector per day for each day from 21-Jlec-89 to 31-May93. Each epoch consists of training the ANN with all training vectors in the training set. The order of the training vectors was random within each epoch. The network was trained for 950 epochs. The test set data contained one vector per day for each day from 01-Jun-93 to 29-Mar-94. The statistiics for this network are shown in Table 1.
I) Observations of the training results: A linear regression (LR) model was developed using the same training data as the

Training
~~

Testing 17.63 14.38 81.6%

linear regression
FFN model

23.14 11.08 48.2%

reduction A " L R

1391

RMSE by Month

Jan-94

I
W

I 1

LK

2 15
-20'. ' ' ' ' ' ' ' 2 ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 1 2 3 4 5 6 7 8 9 10111213141516171819202~22232425262728293031
10
: \

1,s

ANN.predl.&s.r
101

LR predicted = -2.08

.4X

..............

.~

-15

-25

-30

-'
Figure 6. The 20-input ANN and LR model performance for January 1994

Figure 5. The 20-input ANN and equivalent LR model testing characteristics(a) RMSE for each month (b) mean error for each month.

model has less RMSE than the LR model in each of the 41 months in the training set. Figure 4b shows the mean error for each month in the training data set for both the ANN and the LR models. The sendout growth versus time can be observed from this plot. Early in the training set, there is a tendency to overpredict the sendout. In contrast, there is a slight tendency to under-predict the sendout over approximately the last two years of the training set. This shows a limitation of this approach in that we have not taken into account the dynamic nature of gas consumption and of the customer base.

2 ) Observations of the testing data results: Figure Sa shows the monthly RMSE of the testing set data. The first seven months exhibit characteristics seen in the training data. The ANN monthly RMSE was always less than the LR monthly RMSE. We see that for the first three (Summer) months of the testing data the ANN performed in a manner similar to the training performance. This was not the case in September and October where the testing performance was not as good as the training performance, but the testing performance was better than the training performance in November and December.

Then the severe cold in January 1994 occurred. The daily performance is shown in Figure 6. For the first time, the ANN monthly RMSE exceeded the LR monthly RMSE. The ANN actually under-predicted sendout during this period. We hypothesize that this occurred because this severe cold weather did not exist in the training set. A N N s can interpolate well between the training vectors but do not extrapolate well. The ANN February RMSE also exceeded the LR February RMSE. This time the ANN over-predicted. This can be explained by behavioral influences. After the severe weather, people turned down their thermostats. This could be because of bill shock or people also could have adjusted to cooler temperatures. March 1994 testing set performance was similar to the training set performance.
C. A 23-input ANNfor the 1994-1995Heating Season

The poor performance of the A N N s during the severe cold of January 1994 is not be a problem for ANNs trained for the 1994-1995heating season in that this severe cold is now in the training set. Modifications in the input factors were made based on data availability and quality. A 23-input ANN was trained using an enhanced neuron decoupled extended Kalman

1392

RMSE by Month

RMSE by Month

/.I113
301
10 019-94 Nov-94
70 r

L Y
30

20
10

Dec-94

Jan-95

013-94

Nov-94

Dec-94

Jan-95

Mean Error by Month Gas Control w forecast = -1.60 Lli w forecast = 1.85 ......~ ANNw forecast-=-5.09

Mean Error bv Month

-10

:li
U,
Oct-94
I

-151 -20

Nov-94

Dec-94

Jan-95

-50 -60 1

Od-94

Nov-94

DeC-94

Jan-95

Figure 7. Monthly RMSE for the gas controller estimates;,the linear regression model estimates, and the ANN estimates for the fmt 97 days of the 1994-95 heating season for the WGC SEW region

Figure 8. Monthly RMSE for the gas controller estimates, the linear regression model estimates, and the ANN estimates for the fust 97 days of the 1994-95 heating season for the WGC ANR Districts region

filter algorithm [2] with periodic sensitivity adjustments on WGC SEW data. The RMSE for this ANN is 10.67. The training set data contained one training vector per day for each day from 08-Jan-90 to 31-May-94. The network was trained for 1000 epochs in a fashion similar to the A N N s discussed previously. We are obtaining the real test set data as we go through the 1994-1995 heating season. This ANN was implemented in a spreadsheet for use by the gas controllers at WGC. Each morning, using weather forecasts, estimated sendouts from previous days, acteal recent weather data, etc., the gas controllers make the load estimate using their usual methods. Then, using the same data, they run the spreadsheet to calculate the ANN sendout estimate. The performance statistics of this ANN using weather forecast data and estimated previous sendout data are shown in Figure 7. The performance statistics of the estimates made by the human experts is also included in Figure 7. A first observation to make is that the errors are considerably larger than for the 1I-input and 20-input networks in the previous two subsections. This is completely

explained by data quality. The two networks were evaluated using actual weather and actual previous sendouts. This test is being performed in real time in that the data being used is weather forecasts and estimated previous sendouts. Overall, and on a month by month basis, the ANN is making more accurate estimates than the human experts. In the first 97 days of the test, the ANN has been more accurate 58 times, the human experts have been more accurate 29 times, and there have been 10 ties. The peak errors for the human expert estimates and the ANN estimates are about the same, in that the peak errors are caused by inaccurate weather forecasts. The ANN estimates are more accurate following large temperature swings, where the human expert estimates are more accurate around and immediately after the holidays.

D. Transferability: a 23-input Ann for a Different Region for


the 1994-1995 Heating Season To test transferability of this technology to other regions,
a ANN w a s trained on data for the WGC ANR Districts region

1393

using the same input factors and training algorithm as the WGC SEW ANN. The RMSE for this ANN is 17.83. The training set data contained one training vector per day for each day from 15-Jan-90 to 14-May-94. The ANN was also implemented in a spreadsheet for use by the gas controllers at WGC. Each morning, using weather forecasts, estimated sendouts from previous days, actual recent weather data, etc., the gas controllers make the load estimate using their usual methods. Then, using the same data, they also run the spreadsheetto calculate the ANN sendout estimate. The performance statistics of this ANN using weather forecast data and estimated previous sendout data are shown in Figure 8. The performance statistics of the estimates made by the human experts is also included in Figure 8. The errors for this region are larger than the errors for the WGC SEW region, although this region is several times smaller that the other region. The difference between the ANN estimates statistics and the human experts statistics are less than the for the WGC SEW region, with the human experts estimates statistics surpassing the ANN estimates statistics for November. Similar trends to those of the other region were observed in the gas load estimate errors, with this additional trend. The ANN estimates during the mild October and November were usually low, that is, under predicted, indicating a possible change in the customer base or consumption behavior. This trend seem to diminish once the cold weather arrived.

when compared to models based on linear regression using the same input factors. Two ANNs, for two regions served by WGC, are being used to predict gas consumption for the 19941995 heating season. For the first 97 days of the analysis, both models have less estimate errors than that of the human experts. This study indicates that improvements need to be made to this technology are indicated. A mechanism to track growth, demand-side management and behavioral influences on consumption needs to be developed. A mechanism for improved gas load estimation on and around holidays is also needed. A mechanism to ensure better extrapolation on peak days is needed. This in not an issue for the next few winters since we have January 1994 to train on, but as this data becomes old, we need to implement a mechanism for peak days so estimates are better the next time a peak day occurs. Although the development of this work was for the WGC SEW region in metropolitan Milwaukee, WI, the technology was transferred to another region served by WGC. The models can be developed for a particular customer base provided that the appropriate historical weather and sendout information is available.

5 . REFERENCES
[ 11 K. Watanabe, T. Fukuda, and S. G. Tzafestas, "Learning

4. SUMMARY AND RECOMMENDATIONS FOR FURTHER WORK The development of feed forward artificial neural network based models for the prediction of gas consumption of a daily basis has been presented for two regions served by WGC. The results indicate that the feed forward ANN based models reduce the residual predicted consumption RMSE by more than half

algorithms of layered neural networks via extended Kalman filters", Znf. J. ofSys. Sci., vol. 22, no. 4, April 1991, pp. 753-768.
[2] G . V. Puskorius and L. A. Feldkamp, "Decoupled ex-

tended Kalman filter training of feedforward layered networks", ZJCNN (Baltimore, MD), vol. I, June 1991, pp. 77 1-777.

1394

You might also like