Improvement of the prediction quality of electrical load profiles with artificial neural networks

. Against the backdrop of the economically and ecologically optimal management of electrical energy systems, accurate predictions of consumption load profiles play an important role. On this basis, it is possible to plan and implement the use of controllable energy generation and storage systems as well as energy procurement with the required lead-time, taking into account the technical and contractual boundary conditions. The recorded electrical load profiles will increase considerably in the course of the digitization of the energy industry. In order to make the most accurate predictions possible, it is necessary to develop and investigate models that take account of the growing quantity structure and, due to the significantly higher number of observations, improve the forecasting quality as far as possible. Artificial neural networks (ANN) are increasingly being used to solve non-linear problems for a growing amount of data that is affected by human and other unpredictable influences. Consequently, the model approach of an ANN is chosen for predicting load profiles. Aim of the thesis is the simulative investigation and the evaluation of the quality and optimality of a prediction model based on an ANN for electrical load profiles.


Introduction
Accurate forecasts of future events are crucial for the optimal operation of electrical energy systems. Due to the digitization of the energy industry, the number of recorded electrical load profiles and also the number of observations per time series will increase significantly. In order to analyze the growing amount of data, corresponding systems and models are needed that are able to recognize structures and patterns from complex information.
Machine learning methods offer an efficient alternative to the manual extraction of the knowledge contained in the data and the derivation of rules. They are used to extracting correlations and insights from large amounts of data in order to make predictions about future events. [1,2] ANN are among the nonlinear dynamic models. The input and output behavior is represented by observations of the process, whereby the connections are represented by internal structures. In recent years, advances in research and technology, especially in computing power and algorithms, have led to better procedures through neural networks. By processing large amounts of data and nonlinear relationships, ANN are very successful, for example in speech recognition. [3][4][5] 2 Analysis of the load profiles The power consumption data is available in the form of annual load profiles. The load curve shows the time course of the electrical power drawn. The time resolution is 15 minutes. Accordingly, 4 measured values are available per hour and 96 measured values on one day. Consequently, the annual load curve is mapped with 35040 data points.

Primary data preparation and plausibility check
The first step before modelling is the preparation of the primary data. The time series are checked for possible measurement errors, outliers and for completeness. In the case of individual missing measured values or obvious measurement errors, these substitute values are interpolated. Due to the normalization of the time series, the values of the load profiles are between zero and one. In the course of the plausibility check, any zero values that occur are set from zero to a low value due to the normalization in the load profile. Otherwise, this data would not represent any relevant information in the neural network and would be weighted with zero. An actual value of zero can only be expected in the event of a power failure, which is not relevant for the load curve forecast.

Data analysis and creation load profile classes
To study the model approach, five load profiles are used, which were examined and classified for selected statistical parameters and show a typical load curve for households. This can be seen from the morning and evening peaks during the day and the weekly rhythm.

Parameter estimation
After defining the model approach, the network parameters are estimated in the course of modeling. The estimation of the parameters, i.e. the edge weights and threshold values, is achieved by training the net. In order to be able to train the network in the best possible way, an appropriate input assignment is coordinated and adapted. Furthermore, data sets are divided into training and test data.
The selection of the additional historical values was determined using the autocorrelation coefficient (ACF) and the partial autocorrelation coefficient (PACF) with regard to the relevant information content for the forecast. The aim is to reduce the complexity of the ANN in terms of computing power and time. Table 1 lists six historical depths that are used as input variables for the model. half hour before 0,9855 -0,6986 week before 0,9365 -0,2252

Splitting the data sets
The time series are divided into two subsets for the analysis of the ANN. The time series were divided 2/3 to 1/3 into training and test data. Therefore the neural network is trained with eight months of the time series. The remaining four months of the year (11615 measured values) are forecasted using the trained network, compared with the test data and evaluated.

Artificial neural network as prediction model
An artificial neural network is an information processing system with analogies to the human brain. The basic idea is based on the reproduction of biological nerve cells and the associated neuronal connections, which can be used to reproduce complex processes. The advantage of ANN is their ability to learn. They are able to adapt to changing conditions and to learn further on the basis of additional data. This makes it possible to continuously improve the network and increase the forecasting quality. [6] The ANN for the prediction model is constructed as a feedforward network due to abstraction and is illustrated in Fig. 1. There are various state-of-the-art ANN methods for similar tasks, such as recurrent neural networks, that exhibit time-dynamic behavior through an internal memory.
The information is transmitted between the nodes, via the connection. The connection weighting varies the data transfer and passes it on to the next layer. Between the input and output layer there can be a number of hidden layers. The system learns by changing the connection weights. The sum of the inputs is weighted in the nodes and transferred to the transfer function when a threshold value is exceeded. The result serves as input for the next layer. The neural network structure is trained using a backpropagation algorithm. For that the net weights and threshold values are corrected by means of the gradient descent procedure to minimize errors. The prediction of electrical load profiles is carried out by the trained ANN by applying n historical values in the input layer. Hereupon the trained net is used to map the forecast value in the output layer. This model approach serves as starting point for the following investigations.

Research studies
The investigation of the prediction model based on an ANN to forecast electrical load profiles are the subject of a current research project at the department. In that respect the model structure of the ANN is mapped and simulated in Matlab and Python. The present paper examines different network structures and hyperparameters to find the optimal network configuration to forecast electrical load profiles. The investigation should show if and what advantage (deep) neural networks have in forecasting of electrical load profiles.
The focal points of the investigation related to the prediction quality are: • Influence of the number of network nodes • Training of the ANN with unstructured/ structured Data • Influence of the data quantity • Selection of historical values/depth of historical values The research focuses on how large amounts of data can be integrated into the model. The investigations aim to the influence of the data quantity related with variation of the network structure and node number and the stability of the forecast. As a result, statements can be made about quality and optimality of the model approach.

Basic specifications of the model
As input variable x(t) a sliding time window with n historical values is applied over the electrical annual load curve. Fig. 2 illustrates the electrical load profile of a household customer as input for the prediction model. x(k-n)

Fig. 2. Example of the prediction model for electrical load profiles form n historical data
The chosen model approach of the ANN has the following basic structure: • 6 input nodes • 1 hidden layer • 10 knots in the hidden layer • 1 output node • Sigmoid activation function • Fully meshed network Starting from this network, the parameter estimates and the simulative investigation are carried out. In order to obtain precise conclusions on the mode of operation and the change in the quality of the forecast, the structure of the network is modified in further investigation steps.

Investigation scenarios
In the training phase, the neural network learns to deduce the output variables from the given input variables. The forecast model is trained on the prediction horizon x(k+96). During the training the connections of the nodes are weighted and determined. The training will continue until the performance goal is reached. Derived from the main points of investigation in Chapter 3.1, the structure of the network is modified on the basis of the basic model.
The following changes made for the analysis of the model behavior: • Increase of the data quantity with further time series • Increase of the number of network nodes in the hidden layer • Increase of the output assignment For each change in the structure of the neural network, a scenario is created ( Table 2). The individual changes are also combined with each other.

Simulation and evaluation of the results
After training the ANN, the simulation is based on the test data that was not used for the training. The forecast generated by the model is then compared with the recorded measured values. For the validation and evaluation of the results, the residuals, i.e. the error between prognosis and observations, are used. The average forecast error and the mean absolute error (mae) can be calculated on this basis. mae = (1) The advantage of the mae over the mean error is the investigation of the absolute deviations between forecast and observation.
The quality of the forecast is also evaluated from the error measures and makes a statement about how well the forecast value corresponds to the real value. quality = (2) In addition, r is calculated, resulting in the linear relationship between forecast and observation. r = (3) Table 3 compares the results for the 8 scenarios examined (cf. Table 2) for the forecast of the value with the prediction horizon x(k+96). Due to the increase in input occupancy by adding further time series from the corresponding time series class, the quality of the forecast could be improved. Furthermore, an increase in the output occupancy, with a simultaneous increase in the number of network nodes, leads to a further increase in forecast quality. This relationship is also expressed in a reduction of the mean absolute error and the increase of the correlation coefficient. The time series of the forecasts for scenarios 1 and 6 are compared with the real data in Fig. 3. The improvement in prediction quality is the result of the structural changes in the neural network. Based on a larger amount of data and as a result a more complex network structure, the ANN can better deduce the required output variables from the given input variables during training.

Conclusion and Outlook
The predictive quality of electrical load profiles was examined using an ANN. As an example, the model was designed for the prediction horizon x(k+96). After the various scenarios have been taught and tested, an improvement in quality can be observed with increasing data volume, accompanied by a smaller error. The increase of the number of network nodes in the hidden layer, as well as the output occupancy have a supporting effect. The variation and increase of the parameters are limited with regard to the complexity and computing power of the ANN. Another aspect of the study is the consideration of the complete period for the next 24 h in a model, based on the representative consideration of the value for the time after 24 h Furthermore, the results form the starting point for further investigations with regard to deep learning procedures. These represent ANNs with an extensive network structure, which are able to continue learning from incoming data while application is running. [1][2][3] In addition, the comparison of the forecast results by ANN with state-space models is recommended. For example, exponential smoothing and autoregressive moving average models can be considered.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.