Simulation of short-term electric load using an artificial neural network

While solving the task of optimizing operation modes and equipment composition of small energy complexes or other tasks connected with energy planning, it is necessary to have data on energy loads of a consumer. Usually, there is a problem with obtaining real load charts and detailed information about the consumer, because a method of load-charts simulation on the basis of minimal information should be developed. The analysis of work devoted to short-term loads prediction allows choosing artificial neural networks as a most suitable mathematical instrument for solving this problem. The article provides an overview of applied short-term load simulation methods; it describes the advantages of artificial neural networks and offers a neural network structure for electric loads of residential buildings simulation. The results of modeling loads with proposed method and the estimation of its error are presented.


Introduction
Currently, one of the urgent tasks of the development of smart grid technology is the problem of optimization of operation modes and equipment composition of small energy complexes [1][2][3]. The solution of such a problem is impossible without using mathematical modeling and applying modern computational methods. One of the key factors that determine the mode of operation of the energy complex is the schedule of energy loads of consumer. The maximum and average power consumption, the ratio of heat and electricity consumption, fluctuations of loads during the day-all these factors influence the choice of the optimal composition of generating equipment for a particular consumer. The optimal variant for solving such a problem is the use of real graphs of consumer loads obtained by measurements. Obtaining real graphs of loads is difficult in practice: firstly, the measurements must be made within a year because of periodicity of energy consumption; secondly, the problem of optimizing energy supply often should be solved at the stage of design or construction of consumer. Therefore, it is usually necessary to resort to load charts modeling.
In recent years, a number of publications [4][5][6][7][8][9][10][11][12] devoted to modeling of electrical loads of various consumer types have been published. The modeling of loads of residential buildings is of particular interest, because, unlike enterprises, the load of municipal consumers is not determined by any plan. Many modeling methods are presented; however, in most cases, each method is considered isolated, without comparison with other methods.
One of the key issues facing the developer of the electric load forecasting method is the choice of a set of source data, which the method will use. The more parameters are used as input data, the higher is the expected accuracy of the forecast, however, the lower is the application area of the method due to the complexity of the search for source data.
The purpose of this study is to develop a method for predicting the electrical loads of residential buildings, based on the initial data, which can be determined without additional dimensions for any consumer or found in open sources. The initial data meeting these requirements will be referred to hereinafter as easily accessible.
The paper considers the advantages and disadvantages of the methods used to simulate electrical loads to date, a method for simulating the electrical loads of residential buildings based on the use of an artificial neural network (ANN) is proposed. The structure of the input data for the neural network is developed, the data on the process of its training, the results of modeling of load graphs by the proposed method and estimation of modeling error are given.
Despite the fact that the work suggests the use of ANN to simulate the loads of residential buildings, the modeling of electrical loads of any consumers has a number of common features, including a large number of parameters that are unobviously related to each other and affecting the magnitude of the load. In view of the foregoing, in the future it is advisable to test the ANN method for simulating the loads of other electric power consumers, for example, small settlements or conductors processed by electric explosion method [13].

Peculiarities of the proposed method
The proposed method, initial data and calculations given in this article relate to electrical load, while full-value solution of optimization problem of energy complexes also demands data on the heat load of consumer. The emphasis on electrical load is done due to the following reasons: (i) Heat supply systems are much more inert than power supply systems, and the short-term difference between the produced and the required heat will not have a negative impact on either the consumer or the manufacturer and, therefore, the thermal load does not need such accurate predictions as electric. (ii) The heating and ventilation loads compose the most of heat load. These loads can be calculated with high accuracy, if heating characteristics of the building and parameters of the outside air are known. At the same time, electrical loads of residential buildings are often stochastic and do not have the same rigid dependence on external conditions, i.e. consumption of electrical energy is much more difficult to predict.
The proposed method of modeling the electrical load with some adjustments can be applied to modeling heat loads, because it is based on methods for processing numerical series and data sets, rather than on specific features of heat and electricity supply. In addition, the paper considers short-term load modeling. This means that a relatively narrow calculation horizon of 1 year is divided into intervals of quasiconstant load short enough for determination of operation modes of energy facilities on the one hand and not allowing usage of extrapolation and direct prediction methods for load modeling on the other hand [6,14]. In this paper, the load graphs were modeled as hourly sequences.
When modeled, load graphs are often represented as the sum of two components: a trend and a random component, which are modeled separately [10]. The random component, having some periodicity, either can be approximated by means of a Fourier-wavelet transform [10], or can be defined as a random variable for each time interval. It was shown in articles [11,12] that when a day is divided into characteristic periods, within each period, the distribution of the random component obeys the normal distribution law. For a residential building, three periods corresponding to the different activities of a person at home can be chosen as characteristic intervals: from 0 to 8 hours, from 8 to 16 and from 16 to 24. Figure 1 shows the experimental daily chart of electric load in a residential building, as well as graphs of its trend and random components [11]. In general, modeling the random component of the load graph is a separate task. Considering the need to simulate load charts in conditions of incomplete information, it is reasonably to model the trend component of the relative electric load, since adding a random component to the trend chart can lead to a strong divergence with the control charts (the random peak of the control chart coincides with the random failure of the simulated graph), which would seriously complicate the estimation of the accuracy of the proposed method.

Applied approaches to the short-term modeling of electrical loads
Four main approaches can be picked out from among methods, used for short-time simulation of the graphs of electrical loads: the simulation, based on data on operation modes of consumer, the typical graphs usage, the allocation of functional dependencies and the use of artificial neural networks.
The first method is suitable for industrial enterprises, where most of the energy consumption is formed by technological processes and the load graphs can be constructed on the basis of data on the quantity of products produced, its specific energy intensity, and the nature and duration of the technological cycles, without taking into account random deviations. The energy consumption of residential buildings is much less predictable, since the inclusion of any electrical appliance is a random event. In the first approximation, the load graph for residential buildings can be modeled using typical graphs (figure 2), which can be found in the literature [15]. For this purpose, the average daily electricity consumption of the building is calculated in accordance with the regulations, taking into account the type and location of the building. Then the typical graph is recalculated so that the total electricity consumption per day becomes equal to the consumption determined by the standards.
Although being easy-to-apply, this method has significant disadvantages. Typical graphs and consumption standards often do not take into account many important factors, influencing electricity consumption. For example, Russian standard of consumption is calculated as a mean for two characteristic months, not taking into account seasonal changes in demand for electricity. Also the calculated standard of consumption can differ from real electricity consumption by up to 60% [16].
The method of the allocation of functional dependencies is based on approximating load graphs by a function (usually periodical) of the only parameter-time. The splines [8], the Fourier transform [9] and the wavelet transform [9,10] can be used as the approximating function. Without taking into account other parameters except time, such approaches have very strict requirements to the initial data for approximation. While using this method there is a need to analyze real load graphs of consumers very similar to the one, whose load graph is going to be modeled. Similar should be not only the types of consumers, but also local climatic conditions, daylight hours and other conditions that can have a significant impact on the power consumption regime. It is usually difficult or even impossible to find enough relevant data for a certain consumer, which means that a common drawback of this approach is the averaging-out of the resulting function and its inability to take into account the individual characteristics of the consumer. To collect enough data for load modeling is always a problem, but the instrument of artificial neural networks have the advantages of both taking into account any essential parameters and providing calculations with insufficient initial data, the presence of gaps and deviations in them [17].

Statement of the problem
The load graph can be considered as a set {p t } T t=1 , where p t is a value of load, corresponding to a hour t, and T is the calculation horizon in hours. Every load value p t corresponds to a certain set of initial data X t = {x 1 , x 2 , . . . , x m } t where m is the dimension of initial data. In fact, the load is a multiparameter function p t = f (X t ). As the amount of parameters affecting electric load of residential buildings is huge (weather, time of day, the mode of operation of local enterprises, etc.), and it is impossible to accurately determine the degree of influence of each of them on this value, strict analytical determination of f (X t ) in practice is problematic. To solve problems of this kind, the method of artificial neural networks is well suited.
The task of modeling the electric load graph is reduced to determining the set of values of electric load P T = {f (X t )} T t=1 over the entire calculation horizon T , provided that the initial data set {X t } T t=1 is known. The function f (X t ), however, is unknown, but can be determined by the neural network as a result of its training. To implement the training it is necessary to provide the so-called training set-a set of data samples {X1 t } T 1 t=1 for which correct solutions set D T 1 is already known. Since the neural network method due to its peculiarities, is always able to give out some solution of the proposed problem, as a criterion of success it is necessary to set the required accuracy of modeling. To verify the accuracy of the simulation, it is necessary to select another set of data {X2 t } T 2 t=1 with known solutions D T 2 -the control set. After training of neural network, it is necessary to solve the simulation problem for the control set, and the mean-square deviation between given solution D T 2 and obtained solution P T should not exceed a certain value. As such a value, 25% was chosen-the maximum value of the mean square error admitted by the participants of the International Forecasting Challenge 2016, included in the top 12 best forecasters [18].

Algorithm for solving the problem and mathematical method of realization
To solve the problem of modeling the electric load of residential buildings using an artificial neural network, the following algorithm of is proposed: The mathematical method of solving the problem is a tool of artificial neural networks. A neural network is a distributed processor, consisting of elementary units of information processing, accumulating experimental knowledge and providing them for further processing. Elementary cells are called neurons. For the accumulation of knowledge neurons use connections between them, which are called synaptic weights [19].
Any neural network has a layer of input neurons for loading the original data, a layer of output neurons and a number of so-called layers of hidden neurons in which calculations are performed. A neural network is called a single-layered, if there is 1 layer of hidden neurons, twolayered, if 2 layers, etc. If the signals inside the network move strictly from the input layer to the output layer, such a network is called a neural network of direct propagation. In a mathematical representation, a neuron can be described by the following two equations: In equations (1), (2) m is the number of input signals of a neuron k; x k1 , x k2 , . . ., x km are values of input signals of a neuron k; w k1 , w k2 , . . ., w km are synaptic weights of neuron k; u k is a linear combination of input effects; b k is a threshold constant of neuron k; sum (u k + b k ) is a signal processed by the objective function and carries the name of the induced local field; ϕ is the activation function of neuron k; y k is the output signal of the neuron. As an activation function, a sigmoid function can be used-the most commonly used function when creating artificial neural networks, thanks to the support of a balance between linear and nonlinear behavior and differentiability [19]: .
(3) Figure 3 shows the scheme of the functioning of an individual neuron k of a hidden layer. A simulation error at a single calculation step is defined as the difference between the received and known solutions: During training, the network tries to solve tasks from the training set and compares the result with the answer that was to be obtained. Any deviation from the given answer entails the correction of the synaptic weights, proportional to the magnitude of the error s t and the signal that caused this error: In (5) ∆w kj is a adjustment of synaptic weight w kj ; η is the learning speed parameter. Such a method of a neural network training is the most common one and is called the method of back propagation of the error [19].
The trained network is tested by control set. The accuracy of the load modeling is estimated from the value of the root-mean-square error S T , calculated as follows: 6. Determination of the structure of the initial data and architecture of the neural network As an basic architectural solution for a neural network, a single-layered neural network of direct propagation was chosen. To determine the number of input signals (the structure of the source data), it is necessary to determine the list of parameters that affect the power consumption of a residential building, as well as the values that they can take. Despite the huge number of such factors, only most significant parameters that can be easily determined in most cases should be taken into account, since the proposed method pursues the aim of modeling load graphs with minimal initial information. In addition, the following assumptions were made: (i) The mode of electricity consumption at any time interval does not depend on the modes of electricity consumption at the previous time intervals. (ii) By the nature of electricity consumption, the days in residential buildings inside the proposed model are divided into workdays and weekends. In spite of the fact that some works also recommend holiday and transitional days [19], it is not possible to find enough number of load graphs of residential buildings for the formation of training and control samples on the relevant days. (iii) Each day is divided into 4 characteristic periods of electricity consumption: night, morning peak, daytime and evening peak. These periods can be easily identified on real load graphs of residential buildings [16,20].
Based on accepted assumptions, as well as on available in open sources load schedules and related information for training and testing of the neural network, the following list of parameters for the initial data was selected: (i) Type of day: workday or weekend. (ii) Type of building: apartment building or private house. (iii) Typical period: night, morning peak, daytime, evening peak. (iv) Presence of electric stoves.
Thus, to calculate the electric load of a single time interval, six parameters characterizing the given interval are fed to the input of the neural network. Among these characteristics, 4 are determined qualitatively, and not quantitatively. Such parameters at the entrance to the neural network can be modeled as n input signals, where n is the number of values that this characteristic can take. Each of the n signals is responsible for its value and is 1 if its value corresponds to the current value of the characteristic, and 0 if it does not match. Thus, the selected 6 parameters will be set by 10 signals of the input layer. The number of neurons of the hidden layer was chosen equal to the number of parameters-5. The proposed structure of a neural network is a single-layer perceptron. The reason for choosing this structure was the relatively simple implementation of the algorithms of its functioning, as well as the experience of successful application in solving similar problems [7]. Figure 4 shows the proposed structure of the neural network. 7. Training of the neural network As a training set, real daily electric load charts of both apartment buildings [11,16,21] and private houses [20] were used. In total, 18 charts of daily loads were selected from which 16 formed a training set, and 2-control set. Two charts from the control sample have the form of characteristic charts for apartment and private houses, respectively. The initial synaptic weights were chosen in such a way that before training of the neural network a set of zero input signals results into the relative electric load of 50%. Due to the limited training sample, it was necessary to repeat the training cycle. The cyclic loading of the training sample into the neural network was repeated until the root-mean-square change in synaptic weights of the neurons over the training cycle fell below 3%, i.e. until the network was stabilized.

Results of modeling
Based on the initial data of the control sample schedules, two graphs were simulated (figure 5).
The root-mean-square error of modeling results for an apartment building was 12%, while for a private house-15%. The root-mean-square error values obtained do not exceed the established permissible value of 25%, although higher than the errors obtained using the most accurate methods of modeling electric loads [18]. Using a deep analysis of load components, a combination of modeling methods, taking into account degree of natural illumination and humidity allow predicting the trend component of the load with an error of 3-7%. However, such a prediction requires taking into account a huge number of parameters obtained as a result of measurements, as well as a high-precision model of climatic conditions. In the framework of the problem being solved, the error values obtained can be estimated as relatively low.

Conclusion
In accordance with the goal, a method for predicting electrical loads of residential buildings on the basis of artificial neural networks was developed and successfully tested, using easily accessible information as the initial data for the calculation.