Comparison of Baseline Load Forecasting Methodologies for Active and Reactive Power Demand

: Forecasting the electricity consumption is an essential activity to keep the grid stable and avoid problems in the devices connected to the grid. Equaling consumption to electricity production is crucial in the electricity market. The grids worldwide use different methodologies to predict the demand, in order to keep the grid stable, but is there any difference between making a short time prediction of active power and reactive power into the grid? The current paper analyzes the most usual forecasting algorithms used in the electrical grids: ‘X of Y’, weighted average, comparable day, and regression. The subjects of the study were 36 different buildings in Terni, Italy. The data supplied for Terni buildings was split into active and reactive power demand to the grid. The presented approach gives the possibility to apply the forecasting algorithm in order to predict the active and reactive power and then compare the discrepancy (error) associated with forecasting methodologies. In this paper, we compare the forecasting methodologies using MAPE and CVRMSE. All the algorithms show clear differences between the reactive and active power baseline accuracy. ‘Addition X of Y middle’ and ‘Addition Weighted average’ better follow the pattern of the reactive power demand (the prediction CVRMSE error is between 12.56% and 13.19%) while ‘Multiplication X of Y high’ and ‘Multiplication X of Y middle’ better predict the active power demand (the prediction CVRMSE error is between 12.90% and 15.08%).


Introduction
The rise in the quantity and diversity of electronic devices makes linking active and reactive power demand harder for every customer [1]. For such a reason, separate active and reactive power forecasting is a viable option. Every electrical grid uses a different approach to predict the electrical consumption. This paper will present popular algorithms used at present, and compare their accuracy, while at the same time showing the contrast between the active power and reactive power forecasting. Hence, we try to contribute to the scientific knowledge of efficient grid management, improving the prediction capacity of reactive power in the grid which facilitates exploitation of Distributed Energy Resources (DER) and integration of the renewable energy sources (RES) into the grid [2].
Forecasting methodologies are based on information from a single variable; that is, forecasting does not need standard deviation calculations that indicate the importance of each variable (weight) in the objective function, as is the case with regression methods, parameter estimation, or data reconciliation [3]. As such, consistency in calculation of the errors can be very important for comparing various algorithms [4] because it works like an indicator that is measured consistently. Additionally, coupling this with some sort of robust filtering like Hampel's X84 rule [5,6].
The basic algorithm used in the electrical grids to generate Customer Baseline Load (CBL) is 'X of Y' methodology, used by, e.g., PJM ISO [7] or CAISO [8], New England ISO (ISONE) employs weighted average to forecasting [9], whereas comparable day and regression are used for short-term power forecasting of wind farms [10,11].
Numerous studies try to improve the baseline accuracy through innovative ideas, different methods, approaches, and assumptions to generate CBL [12]. Table 1 shows some of the relevant previous studies with obtained prediction errors. Table 1. Overview of relevant CBL prediction errors in literature.

Reference
Description Error [13] The authors completed short term forecasting, for 10 industrial customers in Korea. MAPE 2.8-26% [1] The authors examined daily electricity consumption of an administration building located at the Southwark campus of London South Bank University in London.
RMSE 34% [14] The authors undertook short term forecasting for eight users and implemented the baselines in a demand response program.
Average real error 1.15-43% [15] The authors completed short time load forecasting in buildings blocks situated in California. MAPE 10.88-17.97% [11] The authors simulated 195 scenarios of a non-residential building. MAPE 22-40% [16] The data used in this paper were collected from 162 industrial and commercial customers.
Overall Performance Index 6-23.8% [17] The data used in this paper were collected from three commercial buildings in EEUU.

CVRMSE < 20%
While several studies presented in Table 1 used Mean Absolute Percentage Error (MAPE) to estimate the CBL predication error, some experts do not recommend using MAPE [18]. According to the International Performance Measurement and Verification Protocol (IPMVP), the best indicator for a proper baseline error estimation is Coefficient of Variation Root Mean Square Error (CVRMSE) with an established threshold for a successful baseline as CVRMSE < 20% when considering hourly energy use [19].
In addition to the studies listed in Table 1, projects using Artificial Neural Networks (ANN) resulted in more accurate forecasting, but strongly were dependent upon the type of buildings and inputted data quality [20]. We also did not apply Support Vector Regression (SVR) because the method to measure the error in this method is not consistent (the training error and the error of when performing the data validation are different in SVR [21]) with the other methods studied in this document, which would not give us the possibility of comparing SVR with the other methods shown [22].

Materials and Methods
This research examined electricity demand in 36 buildings situated in Terni (Italy) during the years 2016, 2017, and 2018. The data were collected by the local Distribution System Operator (DSO) ASM Terni S.p.A.; data were gathered by means of Advanced Metering Infrastructure (AMI) installed at the customers' locations. With respect to the dataset analyzed in this paper, DSO was identified a group of customers for which data were collected every 15 min; it is worth noting that the Italian Authority prescribes to collect only a monthly aggregated measure.
The implemented procedure used the consumption over the previous days to predict the electricity demand in a window event of 30 min. The algorithms used to generate the baselines were based on the most popular statistical methods implemented in the actual electricity market worldwide: 'X of Y days', comparable day, weighted average, regression, and comparable day with addition or multiplication adjustments [23]. In order to analyze the data, a 'Matlab' script was developed. The script reads the data in '.xlsx' format, generates the baselines for active and reactive power demand, and calculates the errors between the baseline and actual consumption. Mean Absolute Percentage Error (MAPE) [23] and Coefficient of Variation of the Root Mean Square Error (CVRMSE) [24] were calculated.
The baselines can be generated half an hour in advance, or one day in advance of the desired time window. Table 2 shows the inputs and outputs of the applied baseline generation methods. In some cases, the input is a previously generated baseline. 'X of Y' is a statistical methodology which uses 'X' of the 'Y' days before an event. Two alternative approaches are possible: 'X of Y middle' and 'X of Y high'. In the former, 'X' takes the middle values of the 'Y' quantities, while the latter excludes the lowest (Y-X) values. Usually, the 'X of Y middle' is more accurate while 'X of Y high' is a more conservative approach [25].
Equations (1) and (2) show the algorithms used to generate the baselines 'X of Y middle' and 'X of Y high' [26]. Note that subscript t here denotes timestep during the day. In the case of 'X of Y middle', the 'X' values will be those closest to the average value of the 'Y' values, while in the case of 'X of Y high' the 'X' values will be those closest to the highest value of the 'Y' values.
'X of Y' algorithms are used by Pennsylvania-New Jersey-Maryland interconnection (PJM), California Independent System Operator (CAISO), or New York Independent System Operator (NYISO) [26]. A study recommends that (0.4) ≤ (X/Y) ≤ (0.8) and that no data older than 60 days is used to generate the baseline as the weather change can affect the accuracy of the prediction [27]. For 'X of Y' algorithms, the current project took into consideration the demand data over a 5 week long period preceding each date and 0.6 ≤ (X/Y) ≤ 0.8, with Y = 5 and X = 3 or X = 4. Such choice is based upon a study [25] that recommended that the electricity demand data used to generate a baseline should be between 30 and 60 days. We selected 5 weeks (35 days) due to weather conditions, i.e., in order to minimize the impact of the changing seasons on predictions. The same study [25] used both Y = 5 and Y = 10. We chose Y = 5 because the number of previous days we selected (35) is closer to 30 than to 60. In the case when a period of time closer to 60 days would be selected, Y = 10 would be preferred.

Weighted Average
The weighted average algorithm awards more weight to the days further away from the event. The approach gives greater accuracy when there are many irregularities during the day closest to the event [28]. Equations (3) and (4) are used to generate the weighted average baseline [10].
In our study, value for the factor γ was taken as 0.9 according to recommendations [26], while the value of n = 5 was chosen for consistency with the 'X of Y' methodologies.

Comparable Day
The comparable day approach is simpler to apply, because it does not use any equation; the approach consists of generating a baseline with information about a 'similar day'. While 'similar' is usually a subjective term, it can be determined by the weather, or day of the week, for example. The temperature is measured and used to forecast the demand using a previous day with a similar temperature; similarly, measurements of rain or snow fall may be considered [11]. Alternatively, our research took into consideration demand a week before an event to generate a new baseline. For example, to predict the electrical demand on a Monday, the data of the previous Monday were used.

Simple Regression
Simple regression makes a modification to the baseline (b1) and a more precise baseline (b2) using the temperature and the temperature historical data.

Adjustments
Adjustments take a previously generated baseline and make an adjustment in the window before an event (half-hour in our research). Three types of adjustments were used in the current research, multiplication adjustment (Equations (8) and (9)), addition adjustment (Equations (10) and (11)), and linear regression adjustment (Equations (12)- (14)) [16].

Multiplication and Addition Adjustments
The multiplication and addition adjustment have the same concept: take a previously generated baseline and use a factor to reduce the error. In the case of multiplication adjustment, the factor multiplies the baseline, while in the case of addition adjustment the factor adds to or subtracts from the baseline. In our study, after making the adjustments, a subsequent physical analysis was undertaken, and we decided to specify zero baseline if the adjusted baseline took negative values. However, our approach is unable to predict negative demand, e.g., in the case when consumers generate electricity.

Linear Regression Adjustment
Linear regression is the most comprehensive method to forecast the demand because it takes into consideration the weather. Regression is used to predict the 'total consumption' during the day but is not the best way to predict the consumption in a short event window of half an hour [29]. Equations (6) through (8) are used to generate the regression baseline. The main difference between linear regression and simple regression methods is that simple regression does not use temperature, while linear regression does.

Short Term Load Forecasting for Baseline Assessment
The electrical demand depends on numerous factors, e.g., temperature, solar radiation, rainfall, occupancy, etc. In order to compare the different algorithms, the current study calculated two baseline prediction errors: Mean Absolute Percentage Error (MAPE) and Coefficient of Variation Root Mean Square Error (CVRMSE). MAPE is the most widely used method to calculate the error [23], clearly showing the gap between the real and predicted values. However, MAPE exhibits drawbacks if the real value is zero or close to zero. In such cases, CVRMSE can prevent divergences [3]. CVRMSE is harder to calculate but does not have problems with the values close to zero. Equation (13) is used to calculate MAPE, while Equations (14) and (15) Equation (16) CVRMSE error.

Assessment Average
Our study analyzed different buildings and numerous methodologies. The results are presented as an average for each methodology following Equation (16) (tb is the number of buildings-normally 36-but in some cases can be less because of missing data to generate some of the baselines).
An additional parameter considered in this study is the number of buildings in which each method exhibits the best results (with the lowest error). Such parameter is shown in Tables 3-6 in the Min columns, whereas the opposite counts of the buildings reporting the worst performance of a particular method are presented in the Max columns.

Data Normalization
Data normalization typically treats the development of clean data; in order to do this we used MATLAB. Buildings 9 and 36 did not have any indication of the suitable baseline generation methods, as insufficient data were available to generate baselines for them. Such a result may be due to problems with the meters. In building 32, consumption was zero for a large part of the 3 years resulting in mostly zero baseline. We considered such a case as an exception and omitted the results of building 32 from Table 7. The zero consumption could be due to the specific use of the building, e.g., as a warehouse/storage or holiday home, or due to malfunction of the equipment used to measure the electricity consumption.

Results and Discussion
For this study we had 3 years of data, therefore, it was very difficult graphically to see the baseline and the different methods in such a long period of time. For that reason, we included graphs for one week, one graph for active power baselines (Figure 1), and one for reactive power baseline ( Figure 2). However, we followed the IPMVP [19] recommendations and used CVRMSE as principal indicator, and we complemented it with MAPE because it is a common indicator and easy to understand.   Table 3 shows the average MAPE for all buildings. The low error average was obtained for the methodologies with multiplication and addition adjustment. The multiplication adjustment with 'X of Y high' has the overall lowest average error over the considered years ranging between 9.95% and 12.97% annually. Baselines generated without adjustment and using linear regression have a similar average error. The simple regression baselines have the highest average error of 34.57% in 2018. Columns 'Min' and 'Max' in Table 3 show how many buildings have low and high average errors using each of the considered methods. The normal simple regression has the high average error and at the same time is the most common method producing high errors. The number of minimum and maximum values does not necessarily have to match the number of considered buildings (36), as insufficient electricity demand data for a particular period would prevent baseline generation, meaning that the total number of baselines would be less than 36. Another possibility is that, for the same building, multiple methods might have the same maximum or minimum errors, increasing the number of minimum or maximum counts. Table 4 shows the average CVRMSE for all buildings and the number of buildings with the best and the worst averages for each method. In this case, baseline calculation methods with the highest and the lowest CVRMSE do not match those with the highest number of extreme error values. The lowest CVRMSE is for 'Addition Weighted average', ranging between 12.56% and 26.83%, while the same method also has the highest number of buildings with low errors overall during the considered 3-year period.

Active Power Baseline
Depending on the method used to calculate the error, the best baselines are using multiplication setting according to the MAPE calculation or the methods with addition adjustment according to the CVRMSE calculation. Comparatively, MAPE errors were mostly lower than CVRMSE for all prediction methods.  Table 5 shows the MAPE calculation for the reactive power baselines. The algorithm with the best average error is the 'Addition X of Y middle', while 'Multiplication X of Y high' has the highest number of buildings with the lowest average errors during the overall 3-year period, despite having approximately 4% higher average error each year.  Table 6 shows the CVRMSE calculation where 'Addition Weighted average' and 'Addition X of Y high' have the same average errors. Baseline calculation methodology with the highest number of buildings with the lowest average error during the overall 3-year period is 'Addition Weighted average'. The worst methodology to generate a baseline of reactive power demand is 'Normal simple regression' which has the highest average error and the highest number of buildings with high errors (in both cases MAPE and CVRMSE). Comparatively, CVRMSE errors were mostly lower than MAPE for all prediction methods.  Table 7 shows which algorithm is more accurate for each building. The building ID numbers are presented in the first column, while the other columns correspond to considered baseline generation methods. Each row corresponds to a single building, where A was placed for the baseline calculation method with the lowest MAPE for the active power, and R for the method with the lowest CVRMSE for the reactive power.  In nine buildings, the methods with the lowest error are the same but in the other 25 cases they are not coincident. In only 36% of the cases, we obtained the lowest set by applying a single method to predict active and reactive power; in the rest of the cases it would be better to apply different methods.

Conclusions and Future Work
Electrical grids need an upgrade in order to include the innovative technologies of electricity generation (wind turbines, solar panels) and the Distributed Energy Resources (DER). To control a process, it is necessary to understand and predict its main component factors, which in the case of the electrical grid, are the customers and generators. The presented research focuses on prediction of the customers' characteristics, separating the demand in active and reactive power components for each building to improve the accuracy of demand prediction. The main limitation is the sample profile as all the buildings are located in Terni, Italy, in the Italian electrical market. We recommend that future research should consider other electrical markets subject to different usage patterns. While the used sample of selected buildings provided a representation of building performance, increasing the sample size may allow deeper analysis of singular cases such as the buildings with very rare or occasional electricity consumption.
When talking about active power, MAPE calculation is more important because the active power demand values are usually nonzero. For the reactive power, CVRMSE is more significant, because the reactive power demand can be zero, which makes MAPE calculations inaccurate. Consequently, the lowest error resulted from application of 'Addition X of Y middle' and 'Addition Weighted average' in prediction of reactive power (the forecasting error is between 12.9% and 15%), while 'Multiplication X of Y high' and 'Multiplication X of Y middle' provided better prediction of active power demand (the forecasting error is between 9.9% and 12.9%). However, the accuracy of the statistical methods used to generate baselines in this investigation also depended on the building to which they were applied. Better results were obtained by applying different baseline calculation methods to predict the demand for active and reactive power in different years.
Additional research is necessary to verify these findings on a larger customer dataset. In future research, it would be also interesting to investigate the accuracy of prediction methods for active and reactive power in the same building from one day to another, and whether it is better to apply different baseline forecasting methods on specific days. The recommendation would be to take a single building and explore the algorithms studied day by day to see how error varies and whether it is possible to determine which method provides more accurate results on particular days of the week/month/year.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

S (t)
Addition factor b 2(t) Adjusted