Short-Term Electricity Price Forecasting Based on Similar Day-Based Neural Network

: This paper presents four reﬁned distance models to the application of forecasting short-term electricity price namely Euclidean norm, Manhattan distance, cosine coe ﬃ cient, and Pearson correlation coe ﬃ cient. The four reﬁned models were constructed and used to select the days, which are like a reference day in electricity prices and loads, called similar days in this study. Using the similar days, the electricity prices of a forecast day were further obtained by similar day regression (SDR) and similar day based artiﬁcial neural network (SDANN). The simulation results of the case of the PJM (Pennsylvania, New Jersey and Maryland) interchange energy market indicate the superiority and availability of the selection 45 framework days and three similar days based on Pearson correlation coe ﬃ cient model. Author Contributions: Conceptualization, C.-Y.L.; methodology, C.-Y.L.; software, C.-Y.L. and C.-E.W.; validation, C.-Y.L. and C.-E.W.; formal analysis, C.-Y.L. and C.-E.W.; investigation, C.-Y.L.; resources, C.-Y.L. and C.-E.W.; data curation, C.-Y.L.; writing—original draft preparation, C.-Y.L.; writing—review and editing, C.-Y.L.; visualization, C.-Y.L.; supervision, C.-Y.L.; project administration, C.-Y.L.; funding acquisition, C.-Y.L.


Introduction
Under liberalization of electricity industry, the bidding of electricity price is an important operation model of the market operation. The forecast of electricity price is very helpful for the bidding strategies of the market participants [1,2]. There are many factors impact electricity price, in which some factors are more important than others are, and practically, we can only consider those more important factors. In the power market, the load pattern is an effective parameter on the bidding behavior of utility. Therefore, we can consider the historical price and system load as the factors which impact on price [3]. Scholars usually used classical regression analysis theory [4][5][6] to forecast the price for managing location marginal price (LMP). Nowadays, artificial intelligence methods, such as neural network [7][8][9][10] and particle swarm optimization [11][12][13][14] are widely used in many fields. Particularly, some modified neural network, such as fuzzy neural [15,16], and some statistical methods, such as time series method [17,18], are used for forecasting the price. However, the historical data and proper training are non-linear, and mass data of load and electricity always decrease the level of forecasting accuracy. Thus, using similar days to forecast the price becomes a new issue. Furthermore, the electricity price forecasting was concerned by the combination of the electricity price and load data to increase the accuracy. And the manner can efficiently improve the computational time under the approximately accuracy. In this paper, we refine four distance models to calculate the similarity between the similar days and reference day, which is the day before the forecasting day. Finally, the four models of choosing similar days, Euclidean norm, Manhattan distance, Cosine coefficient, and Pearson correlation coefficient were discussed to the influence of the forecasting accuracy of the electricity price.

Relation Evaluation
Choosing appropriate data of price and load is important to LMP forecast. We apply the method choosing similar days to increase the performance of the forecasting [19,20]. In the study, the historical data of PJM (Pennsylvania, New Jersey and, Maryland) interchange energy market, including LMP and load were used due to the high degree of reliability and representative. We defined the correlation coefficient (R) between the price and load in the data, shown as (1). The coefficient of determination R 2 is employed to evaluate the correlation. For example, regarding the LMP and load from January to May in 2006, as shown in Figure 1 [10], R 2 is 0.615 obtained by the regression simulation, which means the R is 0.784 and the LMP and load is high correlation, according to Table 1. Thus, using the load to forecast the LMP is reasonable [21][22][23][24][25].
where P i is LMP of reference day at number i ($/MWh), P is average LMP of reference day ($/MWh), L i is load of reference day at number i (MW), L is average load reference day (MW).

Relation Evaluation
Choosing appropriate data of price and load is important to LMP forecast. We apply the method choosing similar days to increase the performance of the forecasting [19,20]. In the study, the historical data of PJM (Pennsylvania, New Jersey and, Maryland) interchange energy market, including LMP and load were used due to the high degree of reliability and representative. We defined the correlation coefficient ( ) between the price and load in the data, shown as (1). The coefficient of determination is employed to evaluate the correlation. For example, regarding the LMP and load from January to May in 2006, as shown in Figure 1 [10], is 0.615 obtained by the regression simulation, which means the is 0.784 and the LMP and load is high correlation, according to Table 1. Thus, using the load to forecast the LMP is reasonable [21][22][23][24][25]. (1) where is LMP of reference day at number ($/MWh), is average LMP of reference day ($/MWh), is load of reference day at number (MW), is average load reference day (MW).

Similarity Calculation Model
The purpose of this paper is to forecast LMP according to historical loads and prices, called a day before the forecast day as a reference day. The days which are like the reference day in electricity prices and loads are selected and are namely similar days. The structure of similar days is based on

Similarity Calculation Model
The purpose of this paper is to forecast LMP according to historical loads and prices, called a day before the forecast day as a reference day. The days which are like the reference day in electricity Energies 2020, 13, 4408 3 of 15 prices and loads are selected and are namely similar days. The structure of similar days is based on collecting historical data that affect electricity prices and calculate the distance between all historical data and the forecasted day. The correlation between all the data and the forecasted day is evaluated. We adopt four commonly used models in calculating distance, which are Euclidean norm, Manhattan distance, Cosine coefficient and Pearson correlation coefficient. The models with weighted factors are refined, so that obtained model A is the Refined Euclidean norm, model B is the Refined Manhattan distance, mode C is Refined Cosine coefficient, and model D is Refined Pearson correlation coefficient. The models used to evaluate the similarity between the reference days and searched similar days in this paper. Many data science techniques are based on measuring similarity and dissimilarity between objects. Measuring similarity between objects can be performed in a number of ways. Generally, we can divide similarity metrics into two different groups which are similarity-based metrics and distance based metrics. Cosine coefficient and Pearson correlation coefficient are the part of similarity-based metrics and Euclidean distance and Manhattan distance are the part of distance based metrics. We choose those methods because the methods are well-known, relatively easy to use and simple from another method. In our paper, the models of Euclidean distance and Manhattan distance are used to evaluate the data dissimilarity, which means the relativity is higher when the distance value is smaller. The models of Cosine coefficient and Pearson correlation coefficient are used to evaluate the data similarity, which means the relativity is higher when the distance value is bigger. The four refined models are rebuilt as models A, B, C and D, which are described as follows:

Model A: Refined Euclidean Norm
The relativity of Euclidean norm is refined based on [10]. The relativity model involves LMPs and loads of the reference and similar days, shown as (2). where D is distance, P t is LMP of reference day at time t ($/MWh), P p t is LMP of similar day in past at time t ($/MWh), L t is load of reference day at time t (MW), L p t is load of similar day in past at time t (MW), P t−1 is LMP of reference day at time (t − 1) ($/MWh), P p t−1 is LMP of similar day in past at time (t − 1) ($/MWh), L t−1 is load of reference day at time (t − 1) (MW), L p t−1 is load of similar days in past at time (t − 1) (MW), ∆L t is load deviation between reference day and similar days at t time (MW), ∆L t−1 is load deviation between reference day and similar days at time (t − 1) (MW), ∆P t is LMP deviation between reference day and similar days at time t ($/MWh), ∆P t−1 is LMP deviation between reference day and similar days at time (t − 1) ($/MWh), w i is weight factor ( i = 1 ∼ 4).

Model B: Refined Manhattan Distance
The relativity of Manhattan distance is refined based on [10]. The relativity model involves LMPs and loads of reference and similar days, shown as (3).

Model C: Refined Cosine Coefficient
The relativity of Cosine coefficient is refined based on [26]. The relativity model involves LMPs and loads of reference and similar days, shown as (4). where

Model D: Refined Pearson Correlation Coefficient
The relativity of Pearson correlation coefficient is refined based on [26]. The model involves LMPs and loads of reference and similar days, as shown in (5). The average LMP and load mean the value of the LMP and load as the average values from reference day at time t and t − 1 and also on a similar day in the past at time t and t − 1.

Interval of Time Framework
The interval of time framework, d, can be chosen when the reference day is determined, as shown in Figure 2 [26]. For example, assuming that the reference date is point A, the similar days are the d days from the day before a reference day, and past d days before and after the reference day in the previous year. In this study, the d is assumed as 15, 30, 45 and 60.

Procedure of Similar Date Selection
There are five processes to choose similar days which are as follows: reference day definition, interval selection, similarity calculation, similarity sorting, and similar day determination, as shown in Figure 3.

Procedure of Similar Date Selection
There are five processes to choose similar days which are as follows: reference day definition, interval selection, similarity calculation, similarity sorting, and similar day determination, as shown in Figure 3. Step 1. Define a reference day which is one day before the forecasting day; Step 2. Select a proper interval of time framework, d, based on Figure 2; Step 3. Equations (2)-(5) are used to calculate the similarity between the selecting days and the reference day in LMP and load; Step 4. Sort the similarity in Step 3. Note that the (2) and (3) are dissimilarity. Nevertheless (4) and (5) are similarity; Step 5. Choose the number of similar days, N.

Brief Review of Regression Model
The paper uses a typical regression model to forecast the LMPs, as shown in (6), in which the weight factors can be obtained by the least square method [26]. The obtained weight factors in (6) are applied in (2)-(5). Step 1.
Define a reference day which is one day before the forecasting day; Step 2.
Select a proper interval of time framework, d, based on Figure 2; Step 3.
Equations (2)-(5) are used to calculate the similarity between the selecting days and the reference day in LMP and load; Step 4.
Choose the number of similar days, N.

Brief Review of Regression Model
The paper uses a typical regression model to forecast the LMPs, as shown in (6), in which the weight factors can be obtained by the least square method [26]. The obtained weight factors in (6) are applied in (2)-(5).

Regression Model of Forecasting LMPs
The four steps to forecast LMP by using regression model are variables definition, weight factor analysis, weight factor evaluation, and LMPs forecasting, as shown in Figure 4.

Regression Model of Forecasting LMPs
The four steps to forecast LMP by using regression model are variables definition, weight factor analysis, weight factor evaluation, and LMPs forecasting, as shown in Figure 4. Step 1. Variables definition: In the regression model, the dependent variables are assumed as forecasting t+1 , and the independent variables are as , t-1 , , and ; Step 2. Weight factor analysis: Base on the LMPs and loads of similar days and the reference day, the weight factors in (6) can be analyzed; Step 3. Weight factor evaluation: The forecast is acceptable when the probability values (P value) of weight factors are smaller than 0.05. Thus, the independent variables with the P bigger than 0.05 should be removed and the remained weight factors are analyzed though step (2); Step 4. LMPs forecasting: and in (7) are the average LMP and load data respectively, which are obtained by taking an average of selected N similar days. And the forecasting price t+1 can be calculated by the obtained and . Step 1.
Variables definition: In the regression model, the dependent variables are assumed as forecasting P t+1 , and the independent variables are as P t , P t−1 , L t , and L t−1 ; Step 2.
Weight factor analysis: Base on the LMPs and loads of similar days and the reference day, the weight factors in (6) can be analyzed; Step 3.
Weight factor evaluation: The forecast is acceptable when the probability values (p value) of weight factors are smaller than 0.05. Thus, the independent variables with the P bigger than 0.05 should be removed and the remained weight factors are analyzed though step (2); Energies 2020, 13, 4408 7 of 15 Step 4. LMPs forecasting: P t and L t in (7) are the average LMP and load data respectively, which are obtained by taking an average of selected N similar days. And the forecasting price P t+1 can be calculated by the obtained P t and L t . P t+1 =ŵ 0 +ŵ 1 L t +ŵ 2 L t−1 +ŵ 3 P t +ŵ 4 P t−1 (7) Figure 5 illustrates the typical structure of the artificial neural network (ANN) [10] which is consisted of three layers namely input layer, hidden layer, and output layer. The ANN based on price forecasting is called SDANN. The input variables of the proposed SDANN structure for price forecasting are mean similar day data P t , which is an average of chosen N similar days, actual hourly load L t , and actual hourly LMP P t . The output variable of the structure is the LMP of the forecast day, P t+24 . N is 3, 5, and 10 in this paper. The applied ANN uses Back-Propagation (BP) algorithm and 2n + 1 hidden neuron is chosen for forecasting where n is the number of input nodes. The weights are adjusted by using the calculated error between forecasting and actual values. The transfer function is sigmoid and relative parameters assumed as the follows: the number of input neurons is 3, the hidden layer is 1, the output neurons is 1, the hidden layer neuron is 7, the learning rate (α) is 0.8, the momentum factor is 0.1 and the iteration is 5000.

Neural Network Forecasting Model
When using neural network to proceed predicting, firstly, applying neural network proceed LMP forecasting. The historical data which is LMP and load must divide into two section: training data and testing data. Secondly, the training data will be putted into neural network and proceed to repeat training and learning. Finally, the test data will be applied to forecast LMP after finishing training network, as shown in Figure 6 [27].  The applied ANN uses Back-Propagation (BP) algorithm and 2n + 1 hidden neuron is chosen for forecasting where n is the number of input nodes. The weights are adjusted by using the calculated error between forecasting and actual values. The transfer function is sigmoid and relative parameters assumed as the follows: the number of input neurons is 3, the hidden layer is 1, the output neurons is 1, the hidden layer neuron is 7, the learning rate (α) is 0.8, the momentum factor is 0.1 and the iteration is 5000.

Neural Network Forecasting Model
When using neural network to proceed predicting, firstly, applying neural network proceed LMP forecasting. The historical data which is LMP and load must divide into two section: training data and testing data. Secondly, the training data will be putted into neural network and proceed to repeat training and learning. Finally, the test data will be applied to forecast LMP after finishing training network, as shown in Figure 6 [27].

Neural Network Forecasting Model
When using neural network to proceed predicting, firstly, applying neural network proceed LMP forecasting. The historical data which is LMP and load must divide into two section: training data and testing data. Secondly, the training data will be putted into neural network and proceed to repeat training and learning. Finally, the test data will be applied to forecast LMP after finishing training network, as shown in Figure 6 [27].  (a) Training: Selecting similar day interval, d, it is 45 days in the paper, and therefore the load and LMP data have 134 days (excluding the load and LMP of reference day.) as input training data. According to Figure 2, input training data is based on the reference date which is point A. The similar days are the d days from the day before a reference day and past d days before and after the reference day in the previous year. And during training, need to exclude the load and LMP of reference day. (b) Testing: Forecasting input data is the load and LMP of the reference day.

Forecast Accuracy
Forecasting prices which are applied to neural network and regression model must examine forecast accuracy by error value. In forecast accuracy, then mean absolute percentage error (MAPE) and forecast mean square error (FMSE) are the standard to verify the accuracy [26].
(a) Mean absolute percentage error Also known as the absolute average relative error, it can show forecast accuracy accurately, shown as (8): is actual average LMP on prediction day ($/MWh), which is shown in (9). The value of FMSE is [0, ∞]. The forecasting accuracy will be lower when the FMSE value is bigger, related to (8) and (9).
The forecasting accuracy will be lower when the FMSE value is bigger, related to (8) and (9).

Regression Model Simulation Result and Comparison
To verify the effectiveness of the proposed method in this research, five days as the forecast days are chosen from the historical data of PJM (Pennsylvania, New Jersey and, Maryland) interchange energy market, which are 20 January, 10 February, 5 March, 7 April and 13 May of 2006. The data used is adequate to be applied in the proposed model. The time choosen as intervals d are 15 days, 30 days, 45 days, and 60 days. We find out similar days N (three days, five days, and 10 days.) through models A to D to be the input of regression model and proceed LMP forecasting. MAPE simulation result of regression model LMP forecasting, which is illustrated in Table 2. To average the simulation result of the 5 forecasting days, obviously, the best LMP forecasting accuracy in model D, d = 45, and N = 3, the MAPE is 9.41%, which is illustrated in Table 3. Therefore, the forecasting performance by using model D to choose similar day is better than the other three models. Moreover, the performance of d = 45 in this research is the best when choosing intervals because there would be problems in cross seasonal electricity using habit differences if the chosen interval is too long. However, if the chosen interval is too short makes the data amount too small. Moreover, the performance is better if similar day, N = 3, because the data chosen is the most like similar day.         Table 3. Five-day average MAPE analysis (Regression model).

Neural Network Simulation Result and Comparison
In this study, five days as the forecast days are chosen, which are 20 January, 10 February, 5 March, 7 April and 13 May of 2006. The times chosen as interval d are 15 days, 30 days, 45 days, and 60 days. The similar days N (three days, five days, and 10 days) through models A until D to be the input of the neural network and proceed LMP forecasting. The simulation result is illustrated in Table 4. To average the simulation results of the five forecasting days, obviously, the best forecasting accuracy, which illustrated in Table 5 is from model D (d = 45, N = 3).       Obviously, from Figure 7, it can be seen that using the neural network to predict location marginal price is closer to actual LMP. The performance using the neural network is better than the regression model forecasting method. The reason is, before predicting, the neural network goes through repeat learning training and the process of error adjustment weight value, whereas regression model lack of the learning character. The MAPE and FMSE of regression model and neural network forecasting price are illustrated in Table 6. In Table 6, the forecasting accuracy of neural network is better than that of regression model by calculating MAPE and FMSE. Some statistics regarding single forecast day result: For the accuracy of using neural network is minimum 1.18% improved, 6.62% maximum improved, and average forecasting improved is 3.88% in MAPE. Energies 2020, 13, x FOR PEER REVIEW 12 of 14 Obviously, from Figure 7, it can be seen that using the neural network to predict location marginal price is closer to actual LMP. The performance using the neural network is better than the regression model forecasting method. The reason is, before predicting, the neural network goes through repeat learning training and the process of error adjustment weight value, whereas regression model lack of the learning character. The MAPE and FMSE of regression model and neural network forecasting price are illustrated in Table 6.
In Table 6, the forecasting accuracy of neural network is better than that of regression model by calculating MAPE and FMSE. Some statistics regarding single forecast day result: For the accuracy of using neural network is minimum 1.18% improved, 6.62% maximum improved, and average forecasting improved is 3.88% in MAPE.

Conclusions
This research analyzed and evaluated the four refined mathematical distance models to the application of forecasting short-term electricity prices. Apply the neural network to predict the LMP makes it closer to the actual LMP. Obviously, the performance using the neural network is better than the regression model forecasting method. Moreover, the simulation results show that using the Pearson correlation coefficient model can improve the accuracy of LMP obtained by the regression and neural network models when choosing the time interval of 45 days and similar days of three days.