# Short-term wind power forecasting using a double-stage hierarchical ANFIS approach for energy management in microgrids

- Dehua Zheng
^{1}, - Abinet Tesfaye Eseye
^{1, 2}Email authorView ORCID ID profile, - Jianhua Zhang
^{2}and - Han Li
^{3}

**2**:13

https://doi.org/10.1186/s41601-017-0041-5

© The Author(s) 2017

**Received: **7 December 2016

**Accepted: **28 February 2017

**Published: **13 April 2017

## Abstract

Determination of the output power of wind generators is always associated with some uncertainties due to wind speed and other weather parameters variation, and accurate short-term forecasts are essential for their efficient operation. This can efficiently support transmission and distribution system operators and schedulers to improve the power network control and management. In this paper, we propose a double stage hierarchical adaptive neuro-fuzzy inference system (double-stage hybrid ANFIS) for short-term wind power prediction of a microgrid wind farm in Beijing, China. The approach has two hierarchical stages. The first ANFIS stage employs numerical weather prediction (NWP) meteorological parameters to forecast wind speed at the wind farm exact site and turbine hub height. The second stage models the actual wind speed and power relationships. Then, the predicted next day’s wind speed by the first stage is applied to the second stage to forecast next day’s wind power. The influence of input data dependency on prediction accuracy has also been analyzed by dividing the input data into five subsets. The presented approach has resulted in considerable forecasting accuracy enhancements. The accuracy of the proposed approach is compared with other three forecasting approaches and achieved the best accuracy enhancement than all.

## Keywords

## 1 Introduction

Renewable energy utilization mainly wind power generation has acquired magnificent considerations in eye-catching number of countries following the adoption of the Kyoto protocol environmental convention. Despite its significant environmental benefits, the continuous intermittency and chaotic fluctuations of wind speed and other weather variables make the output power of wind power generation systems completely stochastic and different from those of conventional energy sources. Due to this indeterminacy, it may get several challenges to connect large quantities of wind power into a power system network. However, this challenge is not surmountable. In order to enhance the economic competence and acceptability of the wind power and to allow a reduction in the penalty of an instantaneous spot market coming from over estimation or underrating of the generation, the exact forecasting of wind power as well as wind speed is necessary. Definitely, a reliable forecasting system can help distribution system operators and power traders to make a better decision on critical situation.

Recently, several techniques have been developed to forecast the wind power and speed. Existing techniques can be classified as statistical, physical and time series modeling techniques based on the forecasting models they used [1]. Currently, it is observed that researchers employ a combination of statistical model and physical methods besides each other to get an optimal approach that is applicable for longer horizons of prediction systems. In these techniques statistical model plays auxiliary role to data collected by physical methods.

Although two major classes of methods have been recognized for the wind power forecasting, (in [2] and [3], comprehensive reviews of these techniques are presented), as mentioned earlier, combination of statistical and physical techniques are more common than the others [4, 5]. Besides, numerous other spatial correlation methods are proposed for short term wind power prediction with the goal of attaining higher prediction accuracy [6]. However, through the passage of time, more advanced and intelligent methods have been proposed. For instance, Artificial Neural Network (ANN) in [7–9], ANN with Gaussian process approximation and adaptive Bayesian learning in [10], combination of wavelet transform with ANN [11], fuzzy logic methods in [5, 12], Kalman filter in [13], support vector machine in [14], and adaptive neuro-fuzzy inference system (ANFIS) in [15] have been proposed for wind power prediction.

Regarding the available research works in the area, new forecasting approaches and techniques of input–output data manipulations are still in demand in order to enhance prediction accuracy and decrease the uncertainty in wind power forecasting, while keeping practically acceptable computation time. This objective leads to the new double-stage hybrid approach proposed in this research paper to utilize both statistical (wind farm SCADA records) and physical (NWP meteorological variables) data sources for achieving an effective and more accurate short-term wind power forecaster model.

In this paper, a new effective short-term wind power forecasting approach based on a double stage hierarchical ANFIS is proposed. The proposed approach utilizes Back Propagation (BP) algorithm to optimize the parameters of the membership functions of fuzzy inference system to achieve a lower error.

The proposed methodology has two hierarchical ANFIS stages. In the first stage, ANFIS is implemented to predict wind speed at the exact height of the wind turbine hub at the point of wind farm installation. In this phase, forecasted meteorological variables (wind speed, wind direction, air pressure, air temperature and humidity) from NWP model as inputs and actual wind speed measurement recorded by the wind farm SCADA as output are utilized to train the ANFIS. In the second stage, ANFIS is developed to map the wind turbine wind speed vs. wind power characteristics based on real operational conditions. Actual wind speed and power measurements recorded by the wind farm SCADA are used, respectively, as input and output to train the ANFIS in this stage. Then, the forecasted wind speed by the ANFIS model in the first stage is applied to the developed (trained) ANFIS model in the second stage in order to estimate the next day wind power output of the wind farm.

The prediction results are presented for the next 24 h with 1 hour time steps. The developed DSA (double-stage ANFIS) prediction approach is compared with DSN (double-stage neural network), DSHGN (double-stage hybrid GA-NN, i.e., NN combined with genetic algorithm), and DSHPN (double-stage hybrid PSO-NN, i.e., NN in combination with PSO) approaches, to demonstrate its effectiveness regarding short-term wind power prediction accuracy and computation time.

The paper is organized as follows. Section II discusses the proposed forecasting model in which methods of employing SCADA system and NWP model are described. Methods of the ANFIS framework as a prediction system and its brief working principles are provided in section III. Sections IV provides different criterions used to evaluate the prediction accuracy. The numerical findings and prediction results for the considered real case-study are provided in sections V. The paper conclusions are drawn in section VI.

## 2 Discussion

### 2.1 Short-term wind power forecasting model

#### 2.1.1 Proposed wind power forecasting strategy

In this paper, a short-term (24-h ahead) wind power forecasting using a double-stage ANFIS model is presented. The main data sources are historical measurement records of the wind farm SCADA system database and meteorological variables of NWP model. The prediction system uses the meteorological predictions of the NWP model obtained at the vicinity of Goldwind microgrid system wind farm in Yizhuang, Beijing, China within 5 km resolution, and actual measurement records of the wind farm SCADA system database. The proposed approach has two hierarchical ANFIS stages. In the first stage, the wind turbine is modeled by a PSO-ANFIS black box to develop a relationship between the predicted NWP meteorological variables (*i.e.* wind speed, wind direction, air pressure, air temperature and humidity) and the actual wind speed measurement recorded by the wind farm SCADA system. In the second stage, ANFIS model is developed to map the wind turbine wind speed vs. wind power characteristics based on the real operational conditions. Then, the forecasted wind speed by the ANFIS model in the first stage is applied to the developed (trained) ANFIS model in the second stage in order to forecast the next day wind power output of the wind farm.

In the process of modeling, a 1 year information record provided from SCADA historical measurements and NWP/WRF model historical weather forecasts are used to train an ANFIS that successfully can estimate a transfer function between specific patterns of input and output quantities. Then, BP is applied to optimize the parameters of the membership functions of ANFIS. This process continues until the prediction error reaches to a suitable value.

### Real-time SCADA system

SCADA system as the central nerve system and inseparable component of the wind farm plays a key role for forecasting systems. Usage of a real-time SCADA gives the operator access to manage wind farm by supervising all of the wind turbines online. This opportunity is presented for operator to set relevant actions in critical situations by a 10 min or 1 h record of the wind farm turbines. In addition, this management system presents a comprehensive record of the wind velocity and power outputs as well as turbines operational availability, which acts as a foundation for short-term wind power prediction.

### Numerical weather prediction (NWP) model

Wind data has a significant impact on wind power forecasting. There are numerous techniques to obtain the wind data: measurements/observations, data mining and numerical weather simulations. The most direct and reliable method to obtain wind data is via on-site observations or measurements. But, they are not always available. Data mining method is flexible, however its potential to downscale the meteorological weather data is limited. The NWP models utilize equations of physical conservation of energy and this permits a more realistic downscaling of the data. Certainly, high-resolution (low-radius prediction sphere) NWP of wind plays the vital role for power prediction.

Recently, concerning availability of advanced computational systems, several wind power prediction researches are directed using NWP models weather data. These studies utilize several NWP models like WRF, COSMO, MM5, and RAMS [16–19]. Besides, several techniques of extrapolation such as wind shear power law and logarithmic law have proposed by researchers to provide appropriate weather information at the height of specific wind turbine hub using meteorological data that are collected at 10 m above the surface of the ground [20].

## 3 Method

### 3.1 Proposed structure for ANFIS

#### 3.1.1 Adaptive neuro-fuzzy inference system (ANFIS)

A fuzzy logic system is capable of mapping nonlinear relationships between an input vector and a scalar output; moreover it can handle both numerical values and human-like linguistic knowledge or variables.

Fuzzy logic system consists of four main components: fuzzifier, rules, inference engine and defuzzifier. Fuzzifier converts a non-fuzzy (crisp) input variable into a fuzzy variable representation, where membership functions assign the degree of belongingness of the variable to a specified attribute. Fuzzy rules are simple “if-then” type, and can be obtained from numerical data relationships or from expert linguistic experience. Sugeno and Mamdani inference engines are the two main kinds of inference mechanisms used in fuzzy logic systems [15].

The Mamdani engine type merges together fuzzy rules into a mapping from fuzzy sets to fuzzy output sets and then apply defuzzification to the output fuzzy set to obtain crisp outputs, while the Takagi-Sugeno directly relates fuzzy inputs and crisp outputs using *singleton spikes* output membership function. The defuzzification step is the final stage of the fuzzy inference process which is accomplished by the defuzzifier by converting the output fuzzy set into a crisp number using different methods such as: centroid of area, bisector of area, mean of maxima, or maximum criteria.

ANNs have the advantage over the fuzzy inference systems that knowledge is automatically gained during the training process by updating the connection weights between neurons [21]. But, this knowledge cannot be taken out from the trained network acting as a black box. On the other hand, fuzzy inference systems can be distinguished by their rules, but these rules are tricky to define when the system has many variables and their relationships are even more complex [22].

A hybrid of NNs and fuzzy inference systems has the advantages of each of them and better performances than any one of them. In a neuro-fuzzy system, NNs automatically extract fuzzy rules from the numerical data and, through the training process, the parameters of the membership functions are adaptively attuned.

ANFIS is a type of adaptive multi-layered feedforward networks [23], applied to nonlinear prediction where past data samples are utilized to predict the data samples ahead. ANFIS adopts the self-learning ability of neural networks with the linguistic expression function of fuzzy inference system [24].

_{i}represents the output of the

*i*

^{ th }node in layer j.

*i*is an adaptive node with the following node function:

Here, either *x* or *y* is the input to the *i*
^{
th
} node and A_{i} (or B_{i-2}) is a linguistic label associated with this specific node.

_{1,i}is the membership value of a fuzzy set A (A

_{1}, A

_{2}, B

_{1}, or B

_{2}) and it indicates the degree to which the specified input

*x*(or

*y*) satisfies the quantifier A. The membership functions for A and B are frequently described by a generalized bell functions as follows:

*p*

_{ i },

*q*

_{ i }, and

*r*

_{ i }are the parameters of the membership function. When the values of these parameters vary, the bell-shaped membership function changes accordingly, thus illustrating various forms of membership functions on linguistic label

*A*

_{ i }

*.*

Actually, any continuous and piecewise differentiable functions, like triangular-shaped functions, are also eligible candidates for the node function in this layer [25]. Parameters of this layer are called premise parameters.

**Π**is fixed whose output representing the rule firing strength is the product of the incoming input signals:

*i*

^{ th }rule’s firing strength to the total sum of all rules’ firing strengths (normalization):

The results of this layer are referred to as normalized firing strengths.

*i*

^{ th }rule to the overall total output:

*a*

_{ i }

*, b*

_{ i }and

*c*

_{ i }) is the parameter set. Parameters in this layer are said to be consequent parameters.

Hence, an adaptive network is equivalent to a Sugeno-type fuzzy inference system from functionality point of view.

### Optimization of ANFIS membership function parameters

In this paper, the two-stage hierarchical ANFIS networks utilize BP algorithm to tune the parameters of the membership functions. The fuzzy membership functions considered in this research paper are triangular-shaped type.

As aforementioned, fundamentally, ANFIS network is a fuzzy inference system mapped onto a neural network structure whose membership function parameters are tuned with a BP algorithm based on some collection of input–output data. This allows the ANFIS network to learn. BP carries out a gradient descent within the solution’s vector space towards a global minimum value along the steepest vector of the error surface.

## 4 Wind power prediction accuracy evaluation

In order to evaluate the accuracy of the DSA wind power prediction approach, the mean absolute percentage error (MAPE), the sum squared error (SSE), the root mean squared error (RMSE), and the standard deviation of error (SDE) criterions are used. These performance criterions are computed as a function of the actual wind power that occurred, and defined as follows.

*h,*\( {\overline{P}}_h^a \) is the average actual wind power of the prediction horizon and

*N*is the prediction horizon.

where *e*
_{
h
} is the prediction error at hour *h* and *ē* is the average error of the prediction horizon.

## 5 Result

### 5.1 Case study and numerical Results

The DSA approach has been applied for short-term wind power forecasting in a microgrid wind farm in Beijing, China. This wind farm has a single wind turbine unit with a generation capacity of 2500 kW. NWP meteorological forecasts and historical wind speed and power data are the main data inputs for training. The influence of input parameter dependency on the accuracy of the prediction has been analyzed by dividing the input data set into different subsets.

The prediction horizon is 1 day with a time-interval of 1 hour. Time series of NWP weather forecast, actual SCADA measurement of wind speed and actual SCADA measurement of wind power for the wind farm are recorded from the 1st May 2014 to the 31st April 2015. The forecasting information is given for 4 days corresponding to the four seasons of a year (July 21, 2015, October 15, 2015, January 4, 2016 and April 13, 2016). Thus, days with specifically good wind power characteristics are purposely not selected. This results in an irregular accuracy allocation throughout the year that shows the reality.

Daily forecasting error statistical analysis

Day Type | MAPE | \( \sqrt{SSE} \) | RMSE | SDE |
---|---|---|---|---|

Winter | 7.6979 | 190.2974 | 38.8443 | 38.7981 |

Spring | 13.304 | 25.7918 | 5.2647 | 5.2130 |

Summer | 8.232 | 32.5989 | 6.6542 | 6.6092 |

Fall | 3.2197 | 49.0784 | 10.0181 | 8.8529 |

Mape results comparison of different methods

Day Type | Winter | Spring | Summer | Fall | Average |
---|---|---|---|---|---|

DSN | 9.4074 | 18.52 | 12.33 | 4.5055 | 11.191 |

DSHGN | 8.8829 | 18.449 | 11.85 | 4.3908 | 10.893 |

DSHPN | 8.4167 | 16.369 | 10.486 | 3.9108 | 9.7954 |

DSA | 7.6979 | 13.304 | 8.232 | 3.2197 | 8.1133 |

The proposed forecasting approach gives better forecasting accuracy: the MAPE has 8.1133% average value. The proposed approach’s average MAPE improvement with respect to the previous three approaches is 37.93, 34.26 and 20.73%, respectively.

In addition to implementing effective wind power forecasting approach, analysis of impacts of input-data dependency (input-parameter selection) on the accuracy of a prediction model is highly important in developing a stable wind power forecasting model.

Comparison of mape results for different input-data subsets

Day Type | Winter | Spring | Summer | Fall | Average |
---|---|---|---|---|---|

Subsets #1 | 7.9576 | 13.5637 | 8.4917 | 3.4794 | 8.3731 |

Subsets #2 | 7.8463 | 13.4524 | 8.3804 | 3.3681 | 8.2618 |

Subsets #3 | 7.8092 | 13.4153 | 8.3433 | 3.331 | 8.2247 |

Subsets #4 | 7.7721 | 13.3782 | 8.3062 | 3.2939 | 8.1876 |

Subsets #5 | 7.6979 | 13.304 | 8.232 | 3.2197 | 8.1133 |

The DSA approach provides smaller errors compared with the other approaches.

Daily prediction error variance

Winter | Spring | Summer | Fall | Average | |
---|---|---|---|---|---|

DSN | 0.0044 | 0.0449 | 0.0097 | 0.0011 | 0.0150 |

DSHGN | 0 .0023 | 0.0419 | 0.0086 | 0.0010 | 0.0134 |

DSHPN | 0.0023 | 0.0330 | 0.0065 | 0.0008 | 0.0106 |

DSA | 0.0023 | 0.0202 | 0.0037 | 0.0005 | 0.0067 |

As shown in Table 4, the average forecasting error variance is smaller for the DSA approach, reflecting less uncertainty in the forecasts. The proposed approach’s average error variance improvement with respect to the previous three approaches is 123.88, 100 and 58.21%, respectively.

The DSA approach results in improved prediction accuracy, outperforming the other approaches. The proposed prediction approach with input data subset #5 has presented the best performance and enhanced accuracy over the other data subsets.

Furthermore, the average computation time is around 8 s, using MATLAB on a PC with Intel core i5-5200 CPU, 2.20 GHz processor and 4 GB RAM. Therefore, the proposed multi-stage hierarchical forecasting strategy is both novel and effective for short-term wind power forecasting.

## 6 Conclusion

In this research paper, a new hierarchical hybrid approach is proposed for short-term wind power forecasting using ANFIS. The approach has two hierarchical stages. The first ANFIS network models the relationship between NWP meteorological parameters around the vicinity of the wind farm within 5 km resolution and the exact wind speed measurement at the wind farm. Whereas, the SCADA records of the actual wind speed and output power relationships are modeled by the ANFIS network in the second stage. Then, the wind speed prediction result from the first stage is applied to the second stage to forecast the wind power for the next day. The implementation of the proposed approach for wind power forecasting is both novel and effective. The MAPE has 8.1133% average value, outperforming other three prediction methods while the average computational time is lower than 8 s. Therefore, the presented numerical results validate the effectiveness of the proposed approach for short-term wind power prediction.

## Declarations

### Authors’ contributions

DZ contributed to the conception of the study. ATE contributed significantly to analysis, manuscript preparation and manuscript submission as a corresponding author; JZ and HL helped perform the study analysis with constructive discussions, senior professional advice and revised the manuscript. All authors read and approved the final manuscript.

### Competing interests

The authors declare that they have no competing interests.

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## Authors’ Affiliations

## References

- Juban, J., Siebert, N., & Kariniotakis, G. N. (2007). Probabilistic short-term wind power forecasting for the optimal management of wind generation.
*Proc. 2007 IEEE Lausanne Power tech, 15*, 683–688.View ArticleGoogle Scholar - Costa, A., Crespo, A., Navarro, J., Lizcano, G., Madsen, H., & Feitosa, E. (2008). A review on the young history of the wind power short-term prediction.
*Renewable & Sustainable Energy Reviews, 12*, 1725–1744.View ArticleGoogle Scholar - Ma, L., Luan, S. Y., Jiang, C. W., Liu, H. L., & Zhang, Y. (2009). A review on the forecasting of wind speed and generated power.
*Renewable & Sustainable Energy Reviews, 13*, 915–920.View ArticleGoogle Scholar - Landberg, L. (1999). Short-term prediction of the power production from wind farms”.
*Journal of Wind Engineering and Industrial Aerodynamics, 80*, 207–220.View ArticleGoogle Scholar - Damousis, I. G., Alexiadis, M. C., Theocharis, J. B., & Dokopoulos, P. S. (2004). A fuzzy model for wind speed prediction and power generation in wind parks using spatial correlation.
*IEEE Transactions on Energy Conversion, 19*(2), 352–361.View ArticleGoogle Scholar - Barbounis, T. G., & Theocharis, J. B. (2007). A locally recurrent fuzzy neural network with application to the wind speed prediction using spatial correlation.
*Neuro computing, 70*, 1525–1542.Google Scholar - Abinet, T., Zhang, J. H., Zheng, D. H., & Dereje, S. (2016). Short-Term Wind Power Forecasting Using Artificial Neural Networks for Resource Scheduling in Microgrids”.
*International Journal of Science and Engineering Applications (IJSEA), 5*, 3.Google Scholar - Palomares-Salas, J.C., de l a Rosa, J.J.G.,Ramiro, J.G., Melgar, J., et.al, “ARIMA vs. Neural networks for wind speed forecasting”, in Proc. IEEE International Conference on Computational Intelligence for Measurement Systems and Applications, pp. 129–133, 2009.Google Scholar
- Shuhui, L., Wunsch, D. C., O’Hair, E. A., & Giesselmann, M. G. (2001). Using neural networks to estimate wind turbine power generation.
*IEEE Transactions on Energy Conversion, 16*(3), 276–282.View ArticleGoogle Scholar - Blonbou, R. (2011). Very short-term wind power forecasting with neural networks and adaptive Bayesian learning.
*Renewable Energy, 36*, 1118–1124.View ArticleGoogle Scholar - Catalao, J. P. S., Pousinho, H. M. I., & Mendes, V. M. F. (2011). Short-term wind power forecasting in Portugal by neural networks and wavelet transform.
*Renewable Energy, 36*, 1245–1251.View ArticleGoogle Scholar - G. Sideratos and N. Hatziargyriou, “Using radial basis neural networks to estimate wind power production,” in Proc. IEEE Power and Energy Soc. General Meeting, pp. 1–7, 2007.Google Scholar
- Louka, P., Galanis, G., Siebert, N., Kariniotakis, G., Katsafados, P., Pytharoulis, I., & Kallos, G. (2008). Improvements in wind speed forecasts for wind power prediction purposes using Kalman filtering.
*Journal of Wind Engineering and Industrial Aerodynamics, 96*, 2348–2362.View ArticleGoogle Scholar - Ying, D., Lu, J., & Li, Q. (2008). Short-term wind speed forecasting of wind farm based on least square-support vector machine.
*Power Systems Technology, 32*(15), 62–66.Google Scholar - Pousinho, H. M. I., Mendes, V. M. F., & Catalão, J. P. S. (2010).
*Neuro-Fuzzy Approach to Forecast Wind Power in Portugal*. Granada: International Conference on Renewable Energies and Power Quality (ICREPQ’10).Google Scholar - M. Negnevitsky, P. Johnson, and S. Santoso, “Short term Wind Power Forecasting using hybrid intelligent systems,” in Proc. IEEE Power Engineering Society General Meeting, pp. 1–4, June 24–28, 2007.Google Scholar
- Sanchez, I. (2006). Short-term prediction of wind energy production.
*International Journal of Forecasting, 22*(1), 43–56.View ArticleGoogle Scholar - Shu, F., Liao, J. R., Ryuichi, Y., & Luonan, C. (2006). Forecasting the Wind Generation Using A Two-stage Hybrid Network Based on Meteorological Information. In
*Information and Communications Engineering, Osaka Sangyo University*.Google Scholar - Jursa, R. (2007).
*Wind power prediction with different artificial intelligence models*. Milan: Proc. European Wind Energy Conference EWEC’07.Google Scholar - Charabi, Y. (2009). Arabian summer monsoon variability: teleconexion to ENSO and IOD. In
*Atmospheric Research*(pp. 105–117).Google Scholar - Catalão, J. P. S., Mariano, S. J. P. S., Mendes, V. M. F., & Ferreira, L. A. F. M. (2007). An artificial neural network approach for short-term electricity prices forecasting.
*Eng Intell Syst Elect Eng Commun, 5*(1), 15–23.Google Scholar - Rodriguez, C. P., & Anders, G. J. (2004). Energy price forecasting in the Ontario competitive power system market.
*IEEE Transactions on Power Systems, 19*(1), 366–374.View ArticleGoogle Scholar - Ying, L. C., & Pan, M. C. (2008). Using adaptive network based fuzzy inference system to forecast regional electricity loads.
*Energy Conv Manag, 49*(2), 205–211.MathSciNetView ArticleGoogle Scholar - Yun, Z., Quan, Z., Caixin, S., Shaolan, L., Yuming, L., & Yang, S. (2008). RBF neural network and ANFIS-based short-term load forecasting approach in real-time price environment.
*IEEE Transactions on Power Systems, 23*(3), 853–858.View ArticleGoogle Scholar - Jang, J. S. R. (1993). ANFIS: adaptive-network-based fuzzy inference system.
*IEEE Transactions on Systems, Man, and Cybernetics, 23*(3), 665–685.View ArticleGoogle Scholar - Conejo, A. J., Plazas, M. A., Espínola, R., & Molina, A. B. (2005). Day-ahead electricity price forecasting using the wavelet transform and ARIMA models.
*IEEE Trans Power Sys, 20*(2), 1035–1042.View ArticleGoogle Scholar