# Hybrid Evolutionary Neuro-fuzzy Computational Tool to Forecast Wind Power and Electricity Prices

G. J. Osório, H. I. Pousinho, J. O. Matias, C. Monteiro, J. S. Catalão

► To cite this version:

G. J. Osório, H. I. Pousinho, J. O. Matias, C. Monteiro, J. S. Catalão. Hybrid Evolutionary Neuro-fuzzy Computational Tool to Forecast Wind Power and Electricity Prices. 3rd Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Feb 2012, Costa de Caparica, Portugal. pp.321-328, 10.1007/978-3-642-28255-3_35. [hal-01365601](https://hal-inriaHal)
# Hybrid Evolutionary Neuro-fuzzy Computational Tool to Forecast Wind Power and Electricity Prices

G.J. Osório¹, H.M.I. Pousinho¹,², J.C.O. Matias¹, C. Monteiro³ and J.P.S. Catalão¹,²

¹ University of Beira Interior and CAST, Covilhã, Portugal

² Instituto Superior Técnico and CIEEE, Lisbon, Portugal

³ Faculdade de Engenharia da Universidade do Porto, Portugal
catalao@ubi.pt

**Abstract.** The intermittence of the renewable sources due to its unpredictability increases the instability of the actual grid and energy supply. Besides, in a deregulated and competitive framework, producers and consumers require short-term forecasting tools to derive their bidding strategies to the electricity market. This paper proposes a novel hybrid computational tool, based on a combination of evolutionary particle swarm optimization with an adaptive-network-based fuzzy inference system, for wind power forecasting and electricity prices forecasting in the short-term. The results from two real-world case studies are presented, in order to illustrate the proficiency of the proposed computational tool.

**Keywords:** Forecasting, computational tool, Wind power, Electricity prices.

## 1 Introduction

Wind-generated energy is accepted as it comes (i.e. as it available) and wind-driven power resources have become increasingly important in planning and operations of power systems [1]. Portugal is no exception; indeed, it has one of the most ambitious goals, establishing 5100 MW of wind power installed by 2012.

However, the availability of the power supply generated from wind energy is not known in advance [2]. Therefore, the integration of large share of wind power in electricity systems leads to some important challenges [3]. Wind power forecasting plays a key role in tackling these challenges [4].

In most competitive electricity markets, price series present the following features: high frequency, non-constant mean and variance, high volatility, high percentage of unusual prices, calendar effects, among other factors [5]. So, price forecasting is extremely important for all market participants for their survival under competitive environment [6].

Short-term wind power forecasting is an extremely important field of research for the energy sector, as the system operators must handle an important amount of fluctuating power forms and the increasing installed wind power capacity. The time scaling, concerning short-term prediction, are in the order of some days (forecast horizon) and from minutes to hours (time step) [7].

Hence, wind power forecasting and electricity prices forecasting represent two very important issues for the power systems sector.
## 2 Contribution to Value Creation

In the technical literature, several methods to forecast wind power have been reported, namely physical and statistical methods. A physical method has advantages in long-term forecast while statistical method does well in short-term forecast [8]. In the same context, several techniques to forecast short-term electricity prices have been reported, namely soft and hard computing techniques [6]. Artificial intelligence approaches can be much more efficient computationally and as accurate as time series models, if the correct inputs are considered [9].

This paper proposes a novel hybrid computational tool based on a combination of evolutionary particle swarm optimization (EPSO) with an adaptive-network-based fuzzy inference system (ANFIS), hereafter defined as EPA approach, for wind power forecasting and electricity prices forecasting in the short-term. The results from two real-world case studies are presented, in order to illustrate the proficiency of the proposed computational tool.

## 3 Proposed Approach

### 3.1 Evolutionary Particle Swarm Optimization

EPSO incorporates a selection procedure to the original particle swarm optimization (PSO) algorithm, as well as self-adapting properties for its parameters [10]. The general scheme of EPSO is the following [11], [12]:

* Replication: each particle is replicated *r* times.

* Mutation: each particle has its weights mutated.

* Reproduction: each mutated particle generates an offspring according to the particle movement rule.

* Evaluation: each offspring has its fitness evaluated.

* Selection: by stochastic tournament the best particles survive to form a new generation.

This scheme benefits in the right direction: - first, the Darwinistic process of selection and the particle movement rule. - Second, it is natural to expect that it may display advantageous convergence properties when compared with classical PSO [11].

### 3.2 Adaptive Neuro-Fuzzy Inference System

The ANFIS architecture is composed of five layers. Each layer contains several nodes described by the node function.

ANFIS is a class of adaptive multi-layer feed forward networks, applied to nonlinear forecasting where past samples are used to forecast the sample ahead. ANFIS incorporates the self-learning ability of neural networks (NN) with the linguistic expression function of fuzzy inference [13]. An adaptive network is functionally equivalent to a Sugeno-type fuzzy inference system.
## 3.3 Evolutionary Neuro-Fuzzy Computational Tool

This sub-section describes the EPA algorithm (Fig. 1) for wind power forecasting or electricity prices forecasting.

**Step One:** Form a matrix with a set of historical data (wind power or electricity prices), arranged in *C* columns of the same matrix.

**Step Two:** Select a number of columns of the previous matrix so that the set of values derived from it represents the input data.

**Step Three:** The selected values of the previous step can be submitted to the entrance of the ANFIS structure.

**Step Four:** Train the ANFIS structure with data of the previous step. The ANFIS structure uses a combination of least-squares method and back-propagation gradient descent method. The EPSO structure is used to tune the parameters associated with the membership functions of fuzzy inference system.

**Step Five:** Create a vector *D*, where *D* equals the number of membership functions, optimized by the EPSO algorithm.

**Step Six:** Define the parameters associated with EPSO algorithm. These parameters are provided in Table 1.

**Step Seven:** Extract the output data of the ANFIS.

**Step Eight:** The result of the forecast is obtained.

<figure><img src="image_1.png" /><figcaption>Fig. 1. Flowchart of the novel EPA approach.</figcaption></figure>
<table><caption>Table 1. Parameters of ANFIS and EPSO.</caption><thead><tr><th colspan="2">Parameters</th><th>Type or Size<br>(for Wind Power)</th><th>Type or Size<br>(for Electricity Price)</th></tr></thead><tbody><tr><td rowspan="3">ANFIS</td><td>Initial membership functions</td><td>2</td><td>4</td></tr><tr><td>Necessary Iterations</td><td>10</td><td>25</td></tr><tr><td>Type of membership function</td><td>Triangular-Shaped</td><td>Triangular-Shaped</td></tr><tr><td rowspan="10">EPSO</td><td>Fitness Acceleration</td><td>2</td><td>2</td></tr><tr><td>Sharing Acceleration</td><td>2</td><td>2</td></tr><tr><td>Initial Inertia Weight of Population</td><td>0.9</td><td>0.9</td></tr><tr><td>Final Inertia Weight of Population</td><td>0.4</td><td>0.4</td></tr><tr><td>Population Size</td><td>12</td><td>168</td></tr><tr><td>Maximum Generation</td><td>24</td><td>320</td></tr><tr><td>Number of Offspring's</td><td>12</td><td>168</td></tr><tr><td>Generation for Each New Particle</td><td>2</td><td>2</td></tr><tr><td>Necessary Iterations</td><td>96</td><td>320</td></tr><tr><td>Minimum Value of New Position</td><td>100</td><td>30</td></tr><tr><td>Maximum Value of New Position</td><td>800</td><td>60</td></tr></tbody></table>

## 4 Forecasting Accuracy Evaluation

To evaluate the accuracy in wind power forecasting and electricity prices forecasting, the mean absolute percentage error (MAPE) is considered. The MAPE criterion is defined as follows:

$$MAPE = \frac{100}{N} \sum_{h=1}^{N} \frac{|\hat{p}_h - p_h|}{\bar{p}} \qquad (1)$$

$$\bar{p} = \frac{1}{N} \sum_{h=1}^{N} p_h \qquad (2)$$

In (1) and (2), $\hat{p}_h$ is the forecasted values and $p_h$ is the actual values at period $h$, $\bar{p}$ is the average values of the forecasting period, and $N$ is the number of forecasted periods. In the case of wind power forecasting $N = 24$, and in the case of electricity price forecasting $N = 168$. The average price is used in (1) to avoid the adverse effects of prices close to zero [14].

## 5 Case Studies

### 5.1 Short-Term Wind Power Forecasting

The proposed EPA approach has been applied for wind power forecasting in Portugal. The numerical results represented take into account the wind farms that have telemetry with the National Electric Grid (REN). Historical data are the only inputs for training the ANFIS. For a coherent and clear comparison, no exogenous variables are considered. The same test days as in [2], [15]-[17], are selected, (July 3 and October 31 of 2007, January 14 and April 2 of 2008), corresponding to the four seasons of the year.
The predicted wind power series are held for 3 hours ahead, taking into account the wind power data of the previous 12 hours with a time-step of 15 minutes. This procedure is repeated until the next 24 hours values are predicted.

Numerical results with the proposed EPA approach in wind power forecasting are shown in Figs. 2 and 3 for spring and fall days, respectively.

<figure><img src="image_2.png" /><figcaption>**Fig. 2.** Spring day: actual wind power, solid line, together with the forecasted wind power, dashed line.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>**Fig. 3.** Fall day: actual wind power, solid line, together with the forecasted wind power, dashed line.</figcaption></figure>

Table 2 shows a comparison between the EPA approach and five other approaches: persistence, auto regressive integrated moving average (ARIMA), neural networks (NN), neural networks combined with wavelet transform (NNWT), and hybrid PSO-ANFIS (HPA), regarding the MAPE criterion.

<table><caption>**Table 2.** Comparative MAPE results for wind power forecasting.</caption><thead><tr><th></th><th>Winter</th><th>Spring</th><th>Summer</th><th>Fall</th><th>Average</th></tr></thead><tbody><tr><td>Persistence</td><td>13.89</td><td>32.40</td><td>13.43</td><td>16.49</td><td>19.05</td></tr><tr><td>ARIMA [15]</td><td>10.93</td><td>12.05</td><td>11.04</td><td>7.35</td><td>10.34</td></tr><tr><td>NN [2]</td><td>9.51</td><td>9.92</td><td>6.34</td><td>3.26</td><td>7.26</td></tr><tr><td>NNWT [16]</td><td>9.23</td><td>9.55</td><td>5.97</td><td>3.14</td><td>6.97</td></tr><tr><td>HPA [17]</td><td>6.71</td><td>7.22</td><td>4.59</td><td>3.13</td><td>5.41</td></tr><tr><td>EPA</td><td>6.13</td><td>6.68</td><td>4.45</td><td>2.85</td><td>5.03</td></tr></tbody></table>

The EPA approach present better forecasting accuracy: the MAPE has an average value of 5.03%. Improvement in the average MAPE of the EPA approach with respect to the five other approaches is: 73.6%, 51.4%, 30.7%, 27.8% and 7.0%, respectively.
## 5.2 Short-Term Electricity Prices Forecasting

The proposed EPA approach has also been applied to forecast prices in the electricity market of mainland Spain. Price forecasting is computed using the historical data of year 2002 for the Spanish market, available at [18].

Again for a coherent and clear comparison, no exogenous variables are considered. The same test weeks as in [19]-[22] are selected, corresponding to the four seasons of the year. The predicted electricity price series are held for 168 hours ahead with a time-step of one hour, taking into account the historical price data of the six weeks (42 days) previous to the week whose prices are to be forecasted.

Numerical results with proposed EPA approach in electricity prices forecasting are shown in Figs. 4 and 5 for winter and fall weeks, respectively.

<figure><img src="image_4.png" /><figcaption>**Fig. 4.** Winter Week: actual electricity prices, solid line, together with the forecasted electricity price, dashed line.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>**Fig. 5.** Fall Week: actual electricity prices, solid line, together with the forecasted electricity price, dashed line.</figcaption></figure>

Table 3 shows a comparison between the EPA approach and four other approaches: wavelet-ARIMA, weighted nearest neighbors (WNN), adaptive wavelet neural network (AWNN), and cascaded neuro-evolutionary algorithm (CNEA), regarding the MAPE criterion.

<table><caption>**Table 3.** Comparative MAPE results for electricity prices forecasting.</caption><thead><tr><th></th><th>Winter</th><th>Spring</th><th>Summer</th><th>Fall</th><th>Average</th></tr></thead><tbody><tr><td>Wavelet-ARIMA [19]</td><td>4.78</td><td>5.69</td><td>10.70</td><td>11.27</td><td>8.11</td></tr><tr><td>WNN [20]</td><td>5.15</td><td>4.34</td><td>10.89</td><td>11.83</td><td>8.05</td></tr><tr><td>AWNN [21]</td><td>3.43</td><td>4.67</td><td>9.64</td><td>9.29</td><td>6.75</td></tr><tr><td>CNEA [22]</td><td>4.88</td><td>4.65</td><td>5.79</td><td>5.96</td><td>5.32</td></tr><tr><td>EPA</td><td>3.59</td><td>4.10</td><td>6.39</td><td>6.40</td><td>5.12</td></tr></tbody></table>

The EPA approach presents, again, better forecasting accuracy: the MAPE has an average value of 5.12%. The improvement in the average MAPE of the EPA approach
with respect to the four other approaches is: 36.9%, 36.4%, 24.1% and 3.8%, respectively.

## 5.3 Computational Burden

In wind power forecasting or electricity prices forecasting, the average computational time required by the proposed EPA approach is less than one minute using MATLAB on a PC with 1GB of RAM and 1.8-GHz-based processor. Hence, the novel approach presents not only better forecasting accuracy, but also an acceptable computation time in both case studies.

# 6 Conclusions

This paper proposed a hybrid evolutionary neuro-fuzzy computational tool, based on combining EPSO and ANFIS (EPA approach), for short-term wind power and electricity prices forecasting. The application of the EPA approach is both novel and effective. In wind power forecasting the MAPE has an average value of 5.03%, and in electricity prices forecasting the MAPE has an average value of 5.12%. The computation time in both cases is less than 1 minute. Hence, the proposed EPA approach presents a good trade-off between forecasting accuracy and computation time in both case studies, taking into account results previously reported in the technical literature.

**Acknowledgments.** This work is funded by FEDER funds (European Union) through the Operational Programme for Competitiveness Factors – COMPETE, and by Portuguese funds through the Fundação para a Ciência e Tecnologia – FCT, under Project No. FCOMP-01-0124-FEDER-014887 (Ref. FCTPTDC/EEA-EEL/110102/2009).

## References

1. Ignácio, J., Rosado, -R., Jimenez, L.A.-F., Monteiro, C., Sousa, J., Bessa, R.: Comparison of Two New Short-Term Wind-Power Forecasting Systems, Renew. Energy 34, pp. 1848--1854 (2009)

2. Catalão, J.P.S., Pousinho, H.M.I., Mendes, V.M.F.: An Artificial Neural Network Approach for Short-Term Wind Power Forecasting in Portugal, In: 15th Int. Conf. on Intelligent System Applications to Power Systems (2009)

3. Kabouris, J., Kanellos, F.D.: Impacts of Large-Scale Wind Penetration on Designing and Operations of Electric Power System, IEEE Trans. Sust. Energy 1, pp. 107--114 (2010)

4. Ernst, B., Oakleaf, B., Ahlstrom, M.L., Lange, M., Moehrlen, C., Lange, B., Focken, U., Rohrig, K.: Predicting the Wind, IEEE Power & Energy Magazine 5, pp. 78--79 (2007)

5. Nogales, F.J., Contreras, J., Conejo, A.J., Espínola, R.: Forecasting Next-Day Electricity Prices by Time Series Models, IEEE Trans. Power Systems 17, pp. 342--348 (2002)
6. Aggarwal, S.K., Saini, L.M., Kumar, A.: Electricity Price Forecasting in Deregulated Markets: A review and Evaluation, Int. Electric Power Energy Systems 31, pp. 13--22 (2009)

7. Costa, A., Crespo, A., Navarro, J., Lizcano, G., Madsen, H., Feitosa, E.: A Review on the Young History of the Wind Power Short-Term Prediction., Renew. Sust. Energy Rev. 12, pp. 1725--1744 (2008)

8. Ma, L., Luan, S.Y., Jiang, C.W., Liu, H.L, Zhang, L.: A Review on the Forecasting of Wind Speed and Generated Power, Renew. & Sust. Energy Rev. 13, pp. 915--920 (2009)

9. Rodriguez, C.P., Anders, G.J.: Energy Price Forecasting in the Ontario Competitive Power System Market, IEEE Trans. On Power Systems 19, pp. 366--374 (2004)

10. Del Valle, Y., Venayagamoorthy, G.K., Mohagheghi, S., Hernandez, J.-C., Harley, R.G.: Particle Swarm Optimization: Basic Concepts, Variants and Applications in Power Systems, IEEE Trans. Evol. Comput. 12, pp. 171--195 (2008)

11. Miranda, V., Fonseca, N.: EPSO-Best-of-Two-Worlds Meta-Heuristic Applied to Power System Problem, In: Congr. Evol. Comput. 2, pp. 1080--1085 (2002)

12. Miranda, V.: Evolutionary Algorithms with Particle Swarm Movements, In: 13th Int. Conf. on Intelligent Systems Application to Power Systems, pp. 6--21 (2005)

13. Yun, Z., Quan, Z., Caixin, S., Shaolan, L. yuming, L., Yang, S.: RBF Neural Network and ANFIS-Based Short-Term Load Forecasting Approach in Real-Time Price Environment., IEEE Trans. Power Systems 23, pp. 853--858 (2008)

14. Shahidehpour, M., Yamin, H., Li, Z.: Market Operations in Electric Power Systems: Forecasting, Scheduling and Risk Management., New York Wiley (2002)

15. Catalão, J.P.S., Pousinho, H.M.I., Mendes, V.M.F.: An Artificial Neural Network Approach for Short-Term Wind Power Forecasting in Portugal., Eng. Intell. Systems Elect. Eng. Commun. 17, pp. 5--11 (2009)

16. Catalão, J.P.S., Pousinho, H.M.I., Mendes, V.M.F.: Short-Term Wind Power Forecasting in Portugal by Neural Network and Wavelet Transform, Renew. Energy 36, pp. 1245--1251 (2011)

17. Pousinho, H.M.I, Mendes, V.M.F., Catalão, J.P.S.: A Hybrid PSO-ANFIS Approach for Short-Term Wind Power Prediction in Portugal, Energy Conv. Manag. 53, pp. 397--402 (2011)

18. Market Operator of the Electricity Market of Mainland Spain, OMEL., http://www.omel.es/

19. Conejo, A.J., Plazas, M.A, Espínola, R., Molina, A.B.: Day-Ahead Electricity Price Forecasting Using the Wavelet Transform and ARIMA models, IEEE Trans. Power Systems 20, pp. 1035--1042 (2005)

20. Lora, A.T., Santos, J.M.R., Expósito, A.G., Ramos, J.L.M., Santos, J.C.R.: Electricity Market Price Forecasting Based on Weighted Nearest Neighbors Techniques, IEEE Trans. Power Systems 22, pp. 1294--1301 (2007)

21. Pindoriya, N.M, Singh, S.N., Singh, S.K.: An Adaptive Wavelet Neural Network-Based Energy Price Forecasting in Electricity Markets, IEEE Trans. Power Systems 23, pp. 1423--1432 (2008)

22. Amjady, N., Keynia, F.: Day-Ahead Price Forecasting of Electricity Markets by Mutual Information Technique and Cascaded Neuro-Evolutionary Algorithm, IEEE Trans. Power Systems 24, pp. 306--318 (2009)