02.09

2016

## Case study: Electric power load forecasting — a comparison of three approaches

Dokładne prognozowanie zapotrzebowania na energię elektryczną jest jednym z najważniejszych problemów sektora energetycznego, istotnym zarówno dla dostawców energii jak i ich klientów. Do konstrukcji prognoz wykorzystuje się zazwyczaj dane historyczne oraz aktualne informacje na temat czynników zewnętrznych (np. warunków pogodowych), które mogą istotnie wpływać na aktualne zapotrzebowanie na energię. Niestety, znalezienie odpowiedniego modelu prognostycznego nie jest łatwym zadaniem. Co więcej, wykorzystywane są często nieoptymalne modele, które mogą prowadzić do niedokładnych prognoz (w szczególności niedoszacowania lub przeszacowania przyszłych wartości zapotrzebowania), a w konsekwencji do poniesienia przez dostawcę dodatkowych kosztów.

W poniższym wpisie patrzymy na zagadnienie prognozowania zapotrzebowania na energię z różnych perspektyw. Szczegółowo porównane będą trzy podejścia: modele regresyjne, modele szeregów czasowych oraz głębokie sieci neuronowe (deep neural networks), zaproponowane przez trzech różnych analityków (współautorów tego opracowania): Artura Suchwałkę, Tomasza Melcera i Adama Zagdańskiego. W analizie wykorzystamy szereg czasowy zawierający wielkości zapotrzebowania mocy Krajowego Systemu Energetycznego (KSE) oraz dodatkowe informacje na temat czynników pogodowych (takich jak: temperatura, nasłonecznienie i prędkość wiatru). Porównamy dokładność prognoz dla trzech różnych horyzontów (tzn. prognozy krótko- średnio- i długoterminowe) oraz przedstawimy potencjalne wady i zalety poszczególnych modeli / algorytmów uwzględnionych w analizie.

Aby umożliwić zapoznanie się z wynikami przeprowadzonej analizy większej grupie czytelników, opracowanie zostało przygotowane w języku angielskim.

## 1 Introduction

### 1.1 Forecasting of electricity demand

Power load forecasting remains one of the fundamental business problems faced by the electricity sector. In particular, accurate forecasts are needed when setting up contracts between providers and consumers of electricity. If the delivered power is lower than the demand, the provider makes a loss (e.g. pays a penalty). On the other hand, when delivered power is higher than the actual demand, the provider may bear additional costs too (e.g. costs concerning selling energy on the SPOT / balancing market). Hence, the more accurate energy load forecasts, the lower costs.

Certainly, there are many kinds of energy contracts. Some of them require paying fees only when the delivered power falls below the contracted value by a certain amount. Other contracts transfer all the risk to the clients, and oblige them to buy additional energy they need on the balancing or SPOT market. Different types of contracts undoubtedly require different forecast evaluation schemes.

Choosing appropriate forecasting models that take into account specificity of electricity demand is not an easy task. Firstly, demand patterns can differ markedly. While some of them exhibit strong and usually complex seasonal behaviour, others may be quite dissimilar (e.g. without significant seasonal fluctuations). Secondly, different clients may use different time intervals to measure energy demand (in particular, not all clients have hourly registered demand). Moreover, there is a number of exogenous factors (e.g. factors related to weather conditions etc.) that may significantly influence the actual energy consumption.

From an energy provider’s perspective, the main task is to construct accurate forecasts of daily or hourly electricity demands, usually for a substantial number of diverse demand patterns. Unfortunately, in practice, weak forecasting models are often used which may lead to over- or underestimated forecasts. Additionally, the applied software solutions are often not stable either. Therefore, there is a substantial need for an effective and transparent software tools being able to make energy load forecasts for many clients.

### 1.3 Solution

In order to provide accurate forecasts of the electricity load one has to develop a suitable approach, taking into account all specific circumstances. Of course, historical energy demand data as well as actual information concerning important external factors should be taken into account first. When building forecasting system it is equally important to take care of archiving results and performing continuous backtesting that will allow providers to verify the quality of derived forecasts. In consequence, one may expect to reduce the costs related to over- or underestimation of the energy demand.

## 2 Data

### 2.1 Data

In the analysis, we use a dataset concerned with the load of the Polish Power System (in Polish: Krajowy System Energetyczny or KSE). The original data consisting of 15 min. temporary values (in MW) were downloaded from the PSE S.A. website, and then aggregated to hourly values. Finally, we obtained over 120.000 observations containing hourly power demand values from 13 years.

Our dataset is shown in Figure 1 (note that for the sake of clarity only a selected time period is shown). It is easily seen that data exhibit multiple seasonalities, i.e.: daily, weekly, and yearly seasonal patterns can be identified. Additionally, one may observe that holidays influence the volume.

### 2.2 Data — factors

External (exogenous) factors related to weather conditions were taken into account in the analysis as well. This included hourly data on temperature, cloud coverage and wind speed (components of the chill factor) from 82 stations from around Poland. Meteorological data were aggregated to country-level averages before analysis.

Figure 2 shows external factors registered for consecutive time points. Of course, one may expect that using this additional information may improve energy demand forecasting accuracy.

## 3 Analysis

### 3.1 Three approaches / frameworks

As mentioned, in order to build forecasting models we used three different approaches, proposed by three data scientists (co-authors of this report, i.e. Artur Suchwałko, Tomasz Melcer, Adam Zagdański) with different backgrounds and experience. This included:

1. regression modelling framework,
2. time series models,
3. deep neural networks.

Consecutive approaches will be described in more detail in the following sections. Here let us only mention that in each of the approaches different model selection methods have been tested, including both expert and data-based solutions. What is important, we assume that the forecast of the exogenous factors is perfect. It means that we do not include uncertainty of forecasting of the factors like weather into the analysis of the forecasting error. Furthermore, the standard learning-test split scheme was applied in order to compare forecast accuracy of all procedures considered in the study.

### 3.2 Other applications

It is worth mentioning that modelling frameworks we used in this study are quite general, and their possible applications are not limited to forecasting energy demand. In particular, described methods can be useful in forecasting other phenomena or quantities, when either external (exogenous) factors or complex seasonality patterns are present.

### 3.3 Regression

#### 3.3.1 Idea

Regression analysis is a process of estimating relationships among variables. The primary goal of regression is describing (forecasting) value of a variable (called dependent) basing on values of a number of other variables (called independent).

The relationship can be described using a variety of approaches, ranging from very simple linear functions (so-called linear regression) to large non-parametric models (e.g. gaussian processes, neural networks). These methods might come both from the classical statistics/probability theory, involving mathematical models of data, and machine learning, more focused on predictive power. The choice depends on many factors. Dataset size is one of the most important factors: big datasets are required for complex methods with many degrees of freedom, where small datasets lead to overfitting. Complex methods are also usually difficult to interpret, whereas simpler methods with low number of parameters are easier to understand. However, complex methods often produce more accurate forecasts. Some other factors that influence the choice of regression method are field-specific practice (some fields settled on using a set of methods well known in the community), robustness to anomalies and violations of model assumptions, availability of specific error measures (whether it is simple to incorporate unusual criteria into the model optimization process), and computational overhead (some methods require lots of time or dedicated hardware for good results).

There is no single best approach. It is possible to compare predictive power of various approaches for a specific dataset using a variety of model selection and validation techniques, but the results will be different for different classes of datasets. Moreover, other factors might be more important to the investigator than just having accurate forecasts: for example, an interpretable model might lead to insights regarding the modeled process, and low computational overhead might be vital for short-term forecasts.

For an overview of classical and modern regression methods see e.g. Hastie, Tibshirani, and Friedman (2009).

#### 3.3.2 What we chose?

After a couple of preliminary tests we decided to make use of classical SVM (Support Vector Machine) method. As independent variables were used volume and other factors from the present and past moments plus seasonality describing variables encoded as dummy variables. The dependent variable was volume from a future moment.

#### 3.3.3 Forecasting with regression

Figure 3 illustrates regression approach to forecasting. It shows past values of the factors (denoted by $F(\cdot)$) from moments $t-h$ to $t + 1$ (future values are treated as known, not forecasted) and past values of the volume denoted by $V(\cdot)$ from moments $t-h$ to $t$. These values form a vector of independent variables. The independent variable is the volume value from time $t + 1$. Regression function is denoted by $f(\cdot)$.

Spróbuj ponownie