Short Term Load Forecasting in Smart Grids : Case Study of the City of Évora

Currently, load forecasting is a fundamental task for planning, operation and exploration of the electric power systems. The importance of forecasting has become more evident with the restructuring of the national energy sector, thus, promoting projects linked to smart grids, namely in Portugal InovGrid. This study proposes the computational forecast model of the load diagram based on the Levenberg-Marquardt algorithm of Artificial Neural Networks. The used data are the time series of active power, recorded by EDP Distribution Telemetry System, and the climatic time series of the Portuguese Institute of the Sea and Atmosphere, collected on the city of Évora. The forecast horizon is short term: from one hour to a week. The results showed that main statistical error parameter (mean absolute percentage error) was not exceed 5%.


INTRODUCTION
The forecast of electric energy consumption is the fundamental tasks for management and control of the Electric Energy Systems (EES).
The electrical energy to be produced must be consumed simultaneously.Unlike other goods in human society (oil, gas, etc.), electrical energy cannot be efficiently stored and, therefore, excesses should not be produced (Bielecki et al., 2004).On the other hand, its shortage will lead to lack of electricity supply with negative impact for consumers, producers and distribution electrical companies.
With previous knowledge of the maximum electrical energy consumption and the evolution of the load diagram, the operators of the EES can efficiently plan and regulate the energy production.
The load diagrams are constructed based on average power values (value collected for each 15-minute interval, which results from the instant power integration divided by the time interval (Kersting, 2007) recorded by Supervisory Control and Data Acquisition (SCADA).
This paper presents the practical computational application developed for the daily load diagram forecast, using the time series of data of the electric sector of Portugal.To test and evaluate the load forecasting model, a pilot project carried by EDP Distribution, the InovGrid (Smart Energy Grid, 2016), was chosen in the urban area of Évora, in the context of smart grids city.Figure 1 shows the general smart grids architecture focused on the customer and an integrated infrastructure of the electrical sector.

HISTORICAL DATA
The city of Évora is fed with 15 kV medium voltage, by two primary substations, Évora and Caeira, connected to REN-ÉVORA transmission substation.The main Évora City consuming sectors are: domestic, services and industry.
During the period between 2013-2015, loads (endogenous variables) from forecast algorithm were collected at 15 kV transformer windings, by the energy metering system of EDP Distribution.Loads are the values of active power (in kW) and inductive/capacitive reactive power (in kvar).
The meteorological factors (exogenous variables) influencing the consumption of electrical energy are: temperature, relative humidity, wind speed, rainfall and brightness (Gross et al., 1987).The data were collected from Portuguese Institute of Sea and Atmosphere (IPMA) to evaluate the impact of those factors on the load diagram.
As an example of the difference in power consumption between winter (6-12 of January) and summer (4-10 of August), in 2014, is presented in Figure 2. Reduction in consumption in summer compared to winter was observed.A lower consumption was detected in the end of the week, due to the traditional slowdown of economic activities.
All data were analysed using MS Excel features.The missing data (outliers) were replaced by the adjacent mean values, or by the values of homologous chronological period for long intervals.

General analysis
The forecast model can be divided into five steps (Tubino, 2007): 1. Objective of the forecast model 2. Data collection and analysis 3. Forecast technique selection 4. Results of load forecasting 5. Model monitoring The first step defines the reason why it will be necessary to predict the product (the electric charge) and the forecast reliability degree.Afterwards, the historical data are collected and analysed to develop the best forecasting technique.In the next step, best quantitative forecasting technique based on the analysis of historical data using mathematical models is defined.The expected load is calculated, and must be compared with the actual load recorded, calculating the error obtained, in order to allow model monitoring.
In summary, the evolution of forecasting methodologies has made significant progress.In the 1960s, methodologies were mainly based on regressive approximations.In the 1980s and early 1990s, the methodologies were related to the knowledge and techniques of artificial neural networks, hybrid systems and genetic algorithms.The limits and adaptability of each method depended on several factors, such as: the diversity and temporal depth of the information collected, the forecast horizon, the climate of the geographical region, and the degree of interdependence between consumption and meteorological variables (Gross et al., 1987).
There are several methods for electric charges prediction: Artificial intelligence based methods allow a better handling with uncertainty, as well as non-linear functions.The prediction based on the artificial neural networks, was widely accepted by the scientific and engineering spheres, becoming the most widespread technique for the load forecasting.There are several scientific publications that prove the quality and robustness of predictions based on neural networks (Chen et al., 1996;Giacometto et al., 2012;Hippert et al., 2001;Lino et al., 2016).

Methodology
Figure 3 illustrates the block diagram model structure studied.ANN are composed of several processing units, called neurons, simply operated.The neuron model is inspired in biological nervous system: receives input values (  ) that are weighted by values associated with each synapse (  ), called synaptic weights.All weighted values are summed, which results in the level of neuron activity (  ),  .)) to the output value (  ). Figure 4 shows the artificial neuron model scheme.
Present study used ANN feedforward with only one direction of information flow (from left to right).The network training was based backpropagation algorithm, which is a systematic procedure for adapting the weights of neural networks based on the descending gradient method.
The backpropagation algorithm is described below (Farias, 2008): 1. Presentation of a time series of data  1 ,  2 , … ,   (standard) of the network, which provides an output   .
2. Error calculation -the difference between the desired value (target) and the output for each value of   .
3. Backpropagated error in the network calculation -the partial derivative of the quadratic error of each element related to the weights  1 ,  2 , … ,   .4. Weights adjustment of each element.5. New network pattern creation and repetition of the process until reached network convergence: absolute value of the error < tolerance arbitrated.

Input vector composition
Input vector for ANN based model structure and composition was defined by following sequence (Santos et al., 2007): 1. Data pre-processing, where the gaps originated by the lack of data acquisition system operation are filled.2. Correlation analysis between endogenous and exogenous variables, to identify relevant influences of independent random factors in the dynamics of electric energy consumption.Despite the low values, only the air temperature had some correlation with the active power.There is no correlation between power and other climatic variables: air humidity, wind speed and cloudiness.Thus, it was defined that the input vector of the proposed forecast model will include only the endogenous variables.3. The chosen variables were subjected to an entropy analysis to determine the length of the short-term memory series, to identify the maximum length of the relevant sequence of contiguous power values to be included in the input vector.4. Auto-correlation analyse performed backwards (to the past) into the time series, leaded to the inclusion in the input vector of past values collected at homologous periods of one preceding week.After having performed the analysis described above, the following input vector was created, consisting in 13 endogenous variables: The variables ( − 1), ( − 2), … , ( − ) are the active power values.() is the forecast value.The gradient   was calculated for the adjacent load values ( − ), ( −  + 1) , where  is the "backward displacement", for example:  1 = ( − 23) − ( − 24),  2 = ( − 24) − ( − 25), etc.
MatLab R2012b software was used to perform the proposed forecast system.As described above, a method based on the backpropagation algorithm, Levenberg-Marquardt, was implemented.This software allows the adjustment of the neural network topology (number of layers and neurons per layer), number of iterations, rate of learning, etc.The training and validation set was used to adjust the parameters of the proposed model, while the test set is used to measure the performance of the model.(Guarnieri et al., 2006) The number of neurons in the single hidden layer was half the input layer.The hyperbolic tangent function was chosen for the hidden layer.A linear function was used as an output layer.The input vector was normalized between -1 and 1, due to linear correlation between the variables.This type of ANN structure is widely adopted by several authors (Chemetova et al., 2017;Santos et al., 2007).

RESULTS AND DISCUSSION
To validate the computational system of load forecasting proposed in this work, the various trials were carried.The time power series were divided into three sets of data: training set (with 50% of data), validation set (with 25% of data) and test set (with 25% of data).The data for the year 2013 were used for the forecasting exercises, and simulation was performed with data from 2014.
The results obtained from simulation with the trained neural network are presented below in graphical form.Each graph shows a plot of both the "real" (obtained from telemetric reading) and "forecast" data.The graphs illustrate a result output example for winter period from 2014. Figure 5 shows the consumption of 4 February 2014, coincident with day of greatest consumption in 2014, recorded in EDP Distribution database.Figure 6 shows the consumption of one week of 2014.
The behaviour of the load diagrams shows low electricity consumption at the beginning of the day, followed by the morning peak, pronounced evening peak (occurs in winter because of use of heating equipment) and a decreasing consumption toward the end of the day.These daily patterns are also present during the weekend.Note that at the weekend the consumption is lower than on weekdays.
To analyse the forecast results numerically, the values for some of the most important statistical indicators are obtained.The percentage error (PEt) and the mean absolute percentage error (MAPE) are the most significant indicators in these studies: In these expressions,   is the power value recorded by the telemetry system (real),  �  is the calculated power value (forecast),  is the number of registers (sample members).
The MAPE is the most widely used statistical indicator in the literature on electric charge.The lower the value of MAPE, the better the performance forecast (Hippert et al., 2001;Santos et al., 2007).
Table 1 presents the maximum value of   and MAPE for the study cases corresponding to registered in the city of Évora.The period under review belongs to winter of 2014 and was: One day (4 th of February), one week (3 rd to 9 th of February) and two weeks (3 rd to 16 th of February).The results are satisfactory considering that the maximum value of MAPE in the forecast studies of this type should not exceed 5% (Giacometto et al., 2012;Hippert et al., 2001).
Figure 7 illustrates the evolution of the error percentage error for the two-week period of February 2014.
Regarding the analysis of error applied to the maximum load (peak) of the city of Évora, it occurred on January 21 st at 20:00.The   at this point was small: 0.70%.The MAPE of 10 records with higher loads of the same year is 0.94%.Statistical error indicators were below 5%, meaning that the results for the forecast model remain accurate.
Performance of forecast model was increased a bit by addition load levels values in the input vector.Load levels are average load values at hourly intervals.Identification of threshold values as the empty, full and peak loads can be done.These names are the same as those used in the Portuguese tariff system, although the temporary intervals of levels in the studied model are different, corresponding to the real behaviour of load diagram.
After model forecast model testing, the statistical indicators used in the analysis of forecast errors suffered improvements in the order of hundredths (in percentage).Although it can be considered a small "progress" in model performance, it may be important in some situations of the electrical network behaviour, for example, in network reconfiguration or overload operation.

CONCLUSIONS
This paper presents a study of the time series of electric load and proposes a model of forecast of short term load in networks of distribution of electricity in medium voltage.The proposed model is based on Artificial Neural Networks algorithms, to predict short-term energy consumption.As case study, the substations of the Évora city, the pioneer of smart grids in Portugal, where the InovGrid project was started, were used.
This model proved to be efficient and easy to use, where update parameters is a quick and efficient process.The comparison of the forecast errors (among which the most important is the MAPE), showed a good model performance and can be used as a support tool in the management and control of electric power networks.

Figure 1 .Figure 2 .
Figure 1.General smart grids architecture(Traça, A. et al., 2016) 1. Statistical methods (traditional) a) Multiple Linear Regression b) Exponential Smoothing c) Stochastic Time Series: • Autoregressive Model • Autoregressive Moving-Average Model (ARMA) • Autoregressive Integrated Moving-Average Model (ARIMA) 2. Methods of Artificial Intelligence a) Artificial Neural Networks (ANN) b) Fuzzy Logic c) Genetic Algorithms d) Knowledge-based Expert Systems Statistical methods have the advantage of being well-developed and based on mathematical equations, although, they depend on a complex mathematical modelling that are hard to deal with rapid variations in factors such as climate, holidays, etc.The regressive model considers the load as a linear combination of functions, such as sinusoids, exponentials, etc.It consists in determining the curve that best fits the historical data of the load, using least squares method.Despite historical data incorporation, models based on time series can add other factors, such as ambient temperature, seasonality, and random effects.

Figure 3 .
Figure 3. Block diagram of the forecast model

Table 1 .
The errors of load forecasting of the city of Évora Error percentage evolution for the two-week period (3 rd to 16 th of February 2014)