Developing a Mathematical Model Based on Weather Parameters to Predict the Daily Demand for Electricity

The System Control Centre (SCC) of the Ceylon Electricity Board (CEB) in Sri Lanka, conducts short term (hour ahead, day ahead) and medium term (up to three years) demand forecasting based on historical demands, seasonal patterns, time of the day and regional sales forecasts. However, there are no measures taken to include the influence of weather conditions in this forecasting. Temperature and humidity have become increasingly dominant determinants of the electricity demand with the increased use of space cooling equipment in commercial and household sectors. In this paper, a methodology is presented to develop a linear model to predict the daily electricity demand based on weather parameters which uses historical hourly demand data and meteorological data of four consecutive years. Meteorological parameters (temperature, relative humidity, wind speed and wind direction) are taken as independent parameters while the hourly demand is taken as the dependent parameter. Correction factors are used to include the effect of the yearly demand growth for improved correlation. Each electricity demand data point is multiplied by this correction factor based on the average demand growth (yearly) and the time of the day. The prediction model consists of 72 independent equations (24 representing a weekday, 24 representing Saturday and 24 representing Sunday). Correction factors are calculated for the calendar holidays, which have a major influence on the electricity demand. Model validation is done for historical weather data as well as for weather forecast data.


Introduction
Electricity demand forecasting plays a vital role in power system planning. Long-term forecasts are used for infrastructure development while short term demand forecasting facilitates merit order plant dispatch. With the introduction of electricity based heating, ventilation and air conditioning (HVAC) systems, the relationship between the electricity demand and weather conditions have become strong since changing weather conditions have a clear impact on the operation of HVAC systems [1].
The SCC carries out yearly energy prediction and day to day demand (daily load curve) prediction. A streamlined method to use meteorological parameters for demand prediction has so far not been implemented in the day to day demand prediction. During the last two decades, electrically powered HVAC systems have been installed in Sri Lanka at an accelerated rate, which have stressed the national power system and challenged the predictability of the daily energy demand. The CEB has to meet different daily demands depending on changing weather conditions. This type of demand variations cannot be predicted by the existing prediction methods.
This paper presents a model to predict the daily electricity demand using weather forecast parameters. By using the model, the influence of weather on the electricity demand can be included in the demand forecasting process, minimizing prediction errors. In order to achieve this objective, the following methodology has been used.

Figure 1 -Comparison of Daily Electricity
Demand in a wet day and a dry day Figure 1 shows a comparison of the daily electricity demand on two days having different weather conditions, but having similar conditions otherwise. The black line represents a day that had heavy rains throughout the country and the red line represents a dry day, which had almost zero rainfall. These two curves show clearly the impact of the weather on the daily electricity demand; having a day demand reduction of around 400 MW and a night peak reduction of around 300 MW when moving from a dry day to a wet day. This type of load variations cannot be predicted by the existing prediction method used by the CEB.

Data Analysis
Lefebvre and Trancis presented different values of heating load characteristics for different ranges of temperature varying from 0 0 C and to -18 0 C. The value of the load was found to increase smoothly as the temperature decreased [2]. Belhadj and Mansour studied the impact of temperature and humidity variations on air-conditioning load model characteristics based on several years of utility field measurements. Two-dimensional and three dimensional analyses of data have been carried out and mathematical relations have been developed for the two cases, to represent the dependence of real power on both humidity and temperature [3].
A model has to be developed to predict the future demand (dependent variable) using weather parameters (independent variables). Using historical weather data and demand data, a relationship needs to be identified between electricity demand and weather parameters.
A hypothesis was made that the electricity demand depends functionally on weather parameters such that: Wx -Weather parameters (independent variables) n -Any rational number The Function (f) of the relationship has to be determined through modeling. For this type of analysis, the best technique to examine the correlation would be regression analysis.
Multiple liner regression analysis (stepwise) was chosen from among different regression analysis methods available since there are a number of weather parameters taken as independent parameters with the daily electricity demand taken as the dependent parameter. The stepwise multiple regressions would focus on finding out the best combinations of independent (predictor) variables that would predict the dependent (predicted) variable [4].
IBM SPSS statistics V 21 software was chosen from among many analytical software available, due to its high processing capability and user friendliness when used in statistical analysis.

2.3.Weather Parameters
Ambient temperature, relative humidity, wind speed, wind direction, rainfall and solar radiation were initially selected as the weather parameters that have significant impacts on the demand for electricity. Solar radiation was left out because of its clear interrelation with temperature.
In step-wise regression, predictor variables are entered into the regression equation one at a time based on statistical criteria. This process is continued only if additional variables add anything statistically to the regression equation. Thus, not all predictor variables may enter the equation in a stepwise regression. To analyze the impact of the exclusion of solar radiation as a parameter from the SPSS input, a "Standard multiple regression" was carried out for the same data set and the coefficients obtained are shown in Table 1 which include tstatistic and the Prob(t) (shown as "sig." in the Table). Prob(t) for solar radiation is more than 0.05 which implies that the null hypothesis cannot be rejected. In stepwise regression, a low significant level of the parameter in the model (high significant level of the null hypothesis) has been identified and thus the relevant parameter had to be excluded.
Although there is historical rainfall data available, there are no rainfall (mm) forecasts available. In place of rainfall, the forecasting organizations provide the probability of precipitation. If the rainfall (mm) is added to the demand prediction model, due to the unavailability of forecasting data, there would be a problem when forecasting.
Thus the remaining four weather parameters, i.e., temperature, relative humidity, wind speed and wind direction were used for the final modeling and the expected model was as follows:

Data Availability
In the year 2008, the Department of Meteorology commissioned an Automated Weather System (AWS) at many of their weather stations. Therefore, very reliable weather data has been available since January 2009. For this study, the hourly weather data from 2009 to 2013 was used.
The SCC has island wide demand data recorded at every half an hour. The data from 2009 to 2013 was taken for the analysis in this study. Within the time period 2009 -2013, embedded generation has not been included in the island wide demand data. Provincial or regional demand data would have been much more useful in improving the accuracy of the analysis, which unfortunately were not available.

Time Dependency
As shown in Figure 2, the daily demand curve of Sri Lanka has two peaks, one in the early morning and the other in the evening, plus a drop in demand late in the night. It is not possible to ascertain accurately, the relationship between weather parameters and the electricity demand unless the effect of time is included in the modeling. The nature of variation of the demand with time is far from linear. To add the time effect, it was decided to predict 24 hourly-spots for a particular day with 24 different model equations.

Minimization of the Effect of External Conditions
The daily electricity demand behavior depends on the nature of the day under consideration, in addition to the weather conditions. As an example, on the Wesak Full Moon Poya Day (one of the most sacred public holidays in Sri Lanka), the night peak demand increases to a maximum and in most of the past years it has recorded the maximum demand of the year. Similarly, during weekends and other public holidays, there is a relatively lower demand for electricity.
Regression accuracy or the strength of the relationship (R value) should be increased when external effects other than the independent parameters are minimized.
To test the above hypothesis, weekend data and public holiday data were removed from the data set and the remaining data was loaded to SPSS for modeling. Bias factors, which have significant influence on the electricity demand, MW Time were later calculated for public holidays and special functional days.

Yearly Demand Growth Effect
The effect of the demand growth needs to be added to the regression as otherwise it will reduce the strength of the correlation.

Figure 3 -Yearly electricity demand growth (from 2009 to 2012)
To calculate the correction factor, an yearly average demand growth-based method was used. The yearly average demand for each time interval was calculated for the existing data, and the percentage variation was calculated for each year (Year 2012 was taken as the base year).
As an example, in the year 2009 at 01.00 hours, the yearly average demand was 738MW. For 2012, it was 881MW. Thus, the percentage increase from 2009 to 2012 at 01.00 hours is 19%. The dominant electricity demand in Sri Lanka comes from the Western Province. Due to high population and industrialization, the Western Province has become the centre of electricity demand, accounting for 55% of the total energy sales in 2012. Region wise demand analysis would be more accurate. However, although weather data is available from several regional meteorological stations, electricity demand data is not available on a regional basis. After considering the dominance of the Western Province, it was decided to consider the entire country as one region, with the demand for electricity considered based on the meteorological data obtained from the weather station in Colombo.

Figure 4 -Comparison of the daily demand curves of weekends and weekdays
If and when the regional electricity demand data becomes available, the methodology developed in this study can be applied for each region and the model can be further improved.
When comparing the demand curves for the seven days of the week, it was seen that the demand curves for weekdays were almost same if there was no special external factor and if the weather was same. However, Saturdays and Sundays were different. The demand curves for Saturdays and Sundays were lower than the curves for weekdays, and Sunday curves were the lowest. This is expected, as during weekends, most of the factories, offices and shops are closed. Considering the variation, it was decided to separate the analysis into 3 groups as weekdays, Saturdays and Sundays.
All of the demand data and weather data were grouped on an hourly basis (24 sets).
Thus, 24 data sets representing a weekday, 24 data sets representing a Saturday and 24 data sets representing a Sunday were separately fed to the SPSS software and linear multiple regression analyses (step wise) were done ( Figure 5).

Figure 5 -Structure of the Model
The independent parameters used in the regression were:  Temperature  Relative Humidity  Wind Speed and  Wind Direction The dependent variable was the electricity demand (adjusted for demand growth) From the regression analysis, 72 sets of weather parameter coefficients were obtained with related R-values to predict the total electricity demand.

Final Model
The model that will predict the final demand consists of three sections (weekday, Saturday, Sunday) each having 24 equations representing the hourly demand. All 72 equations are developed from separate 72 analyses.

Analysis of the Behaviour of the Model
For most of the hourly data points, the full model analysis shows a positive linear relationship between the demand and the temperature, a negative linear relationship between the demand and the relative humidity, a negative relationship between the demand and wind speed and a positive constant. The relationship between the wind direction and demand shows both positive and negative relationships with respect to hourly data points with a very low coefficient.
The deviations from the expected values in respect of data points are shown in Table 6 with some relatively low R-values and high constants. These deviations are concentrated at the time periods in the morning and in the evening, which can be interpreted as errors due to transition period, from night to day and day to night. HVAC system loads and lighting loads would be less and roughly constant during the transition period causing relatively weak relationships between the weather and the electricity demand.
Normally, the ambient temperature range for human comfort is 25 0 C -27 0 C. Automatic air conditioning systems are normally set for the above range. When human interference becomes less in the morning and evening (during travelling time), there is a high probability of AC systems being operated at constant loads despite small variations in the weather. This would differ when people occupy air-conditioned spaces.

Model Validation for Historical Weather Data
The historical weather parameters from 01 st July, 2013 to 10 th November, 2013 were input to the model and the daily electricity demand predicted. The predicted values were compared with the actual demand values taken from the SCC of CEB. The calculation of the percentage error was done accordingly.

Error% = (Actual power -Predicted Power)× 100 Actual power
For more than 10% plus or minus error points, data points were examined together with the engineers of the SCC. If there has been an emergency external factor such as a distribution feeder failure, a transmission line failure or a power plant emergency outage, those points were removed. Average absolute error, standard deviation and variance calculation were carried out for each data point (24 separated sets).  A relatively high error margin could be seen during the early morning hours from 01.00hours to 05.00hours. Data points related to 18.00 hours also show a relatively high error margin. All average absolute error margins are below 10%.

Model Validation for Forecast Weather Data
The purpose of the model that is developed is to predict the future demand curve based on forecasted weather data. For model validation, hourly weather data forecasted for Colombo from the website at http://www.accuweather.com was used. The website gives hourly weather forecast for the next four days free of charge. The weather forecast from the Department of Meteorology, Sri Lanka would be the best option. Owing to the unavailability of detailed hourly forecasts at the time when validation was carried out, a web-based option was used.
Colombo weather forecasts were taken four days ahead (as permitted by the website) and logged from January 2014 to March 2014. For a particular day, four weather forecasts were taken before 4 days, before 3 days, before 2 days and before one day. For each and every forecast, the power demand was predicted from the model (for a single day, four demand (MW) predictions).
The actual hourly electricity demands were taken from the SCC and compared with the predicted electricity demand.
The predictions so obtained and the error values were grouped according to the time of the day(24 groups representing each hour of the day). Error values were summarized and analysed. The error values related to public holidays were removed since the nature of the holiday (as an example, on the Wesak Poya Day, the night time demand increase is abnormal in Sri Lanka) would affect the demand prediction. Also, errors due to failures of the national power system (transmission line tripping, load shedding etc.) were removed being external factors.  Apart from predetermined bias values which will be applicable to the entire prediction, the individual bias option will give the operator flexibility to add a particular bias value to a single predicted demand spot, if and when necessary.
Once the demand values are predicted, the demand curve would be drawn automatically with predicted 24 spots.
From the model, the daily electricity demand curve can be predicted for any day as long as hourly weather parameters are available.

Conclusion
The model developed can be used for the prediction of daily load curve of Sri Lanka, based on weather parameters limited to the accuracy level mentioned in Table 9. The model developed should be revised progressively to include demand growth and improve correlation by adding more historical data. An auto updating system, which automatically includes weather data and demand data, and do the regression daily/weekly to automatically revise the modelled equations would be ideal.
In this study, the effect of embedded generation was not completely considered because at the time of the study the required data was not available. The behaviour of embedded generation in relation to weather depends on local weather data. Since the proposed model has been based on the Western Province weather data, it is necessary to decentralize the model and include provincial whether data to analyse the behaviour of embedded generation. The methodology presented in this study for forecasting the electricity demand would remain unchanged even when embedded generation data is included.
It is essential to have a collaborative working relationship between the CEB and the Department of Meteorology to enhance the accuracy of the model.