Multi-Kalman Filter to Wind Power Forecasting

Wind power forecasting methods are important for the safety of wind renewable energy utilization. However, because wind power is weather dependent and, thus, can be variable and intermittent over different time-scales, it's difficult to build accurate and robust predictive models. In this context, an accurate model is a relevant contribution for a reliable large-scale wind power integration. This paper explores a new approach using a multi-model Kalman filter to provide an estimate of the average hourly wind speed, in a 24 hours horizon. The K-means algorithm is used to obtain the characteristics curves of wind speed each time the sub-model is used for forecasting. The accuracy of the proposed forecasting model is compared with other statistical methods, namely some that are usually considered suitable, robust and accurate.


I. INTRODUCTION
The use of wind power has been growing quickly around the globe and, particularly, in the last decade in Portugal.The strong investment in infrastructures was reflected in the fact that in the last year renewable energies accounted for 57% of the electricity supply in Portugal (REN -Rede Energética Nacional), ranging from hydroelectric power (28%) to wind (22%), biomass (5%) and photovoltaic (1.4%).Non-renewable production, however, accounted for 43% of consumption, divided between coal and natural gas [1].
The problem with wind power is that it is climate dependent, therefore, irregular and with strong variations over different time-scales.Consequently, it is difficult to estimate with reasonable certainty the electric energy that can be produced [2].Moreover, with the increased prevalence of wind power in the energy network it is augmented the unpredictability factor of energy production.This point can only be overcome if there is the ability to predict the power that will be injected into the electrical network [3].
Additional to the technological upgrading of wind power generation systems and reduction of production costs, the improvement of forecasting methods of wind power are fundamental for a more reliable integration into a large-scale energy market, but also for small-scale systems production of self-consumption.This search for prediction accuracy stimulates researchers to develop accurate short-term models for wind power estimation.In last decade research allowed obtaining good wind speed forecasting systems.These can be classified as physical models [4] and statistical methods [5].The first group is suitable for long-term prediction while the second presents a good performance in short-term prediction.Physical models consider geographic and local terrains characteristics and weather variables to estimate the future wind speed and generated power.The statistical methods use statistical tools to predict the wind speed and wind power.Recently, hybrid methods combining mathematical models for weather forecasting and statistical techniques have been proposed [6].In this last group are included the autoregressive model (AR), the moving average model (MA), the autoregressive moving average model (ARMA), the autoregressive integrated moving average model (ARIMA) [7], the Box-Jenkins methodology and the Kalman filter [8].
Alternatively to the classical time series analysis, that models the statistical relationship among the data, mainly soft computing (or machine learning) approaches using fuzzy systems [9], artificial neural networks (ANN) [10] or its recurrent version (RNN) [11], but also other models, like gray predictors or support vector machines (SVM) [12] and Bayesian methods [13] have been used with success.
The aim of this work is to analyse and compare different approaches in what concerns to performance and model estimation time to predict wind speed, along a time series difficult to predict.The forecasting models that will be treated henceforward, are well described in the literature.We focused on the AR, ARMA and the Linear Regressor.Results obtained using these techniques were compared with the proposed Multi-Kalman-Filters (MKF), which structure is based on the K-means classification algorithm.In previous work [14] the hybrid model with NN-Fuzzy Clustering has already been tested in the same way.All these approaches are supervised and, therefore , capable to model the process from input/output data samples.Features used in the train are the mean hourly wind speed values, in m.s -1 , measured on the location of Alvadia, district of Vila Real, Portugal.It covers a period from 1 st of January 2007 to 17 th of March 2009, representing 19368 h in total.This and other data is available from SNIRH (National System of Water Resources) [15].
In this work we propose a new short-term forecasting multi-model in a parallel structure that is a result of an identification process based on the analysis of historical time to find patterns in wind speed time series.This task was performed using the K-means clustering algorithm that recognizes from wind speed series the half-daily pattern sequences.The main inputs for the learning process are wind data collected on selected meteorological stations.The wind speed values from the previous hours are grouped into clusters according to their similarity.After the recognition by the clustering algorithm a Time Variant State Space Model (TVSSM) is associated to each cluster and its parameters are tuned using a Kalman filter method.
The assessment of this new forecast approach, together with the suggested identification method, has shown excellent results in short-term prediction of wind velocity.The proposed MKF approach to forecast wind speed can be 2018 13th APCA International Conference on Automatic Control and Soft Computing (CONTROLO) June 4-6, 2018, Ponta Delgada, Azores, Portugal extended to the wind power generation by using power curves, typically an equation that relates the wind turbine's power output with the cubic power value of wind speed, 3 P v ∝ .By safety condition and limitation of turbines, the range of wind speed allowed is limited.Wind speed has also long periods with low intensity values that do not contribute to the production of electricity.In this situation, it is a sign purely random and of resilience.This problem has less impact on the wind energy signal.So, due to this fact, wind power forecast models are almost times more accurate.In addition, their learning processes are also more robust, convergent and faster.
The organization of this paper is the following: Section 2 presents a modified version of the K-means algorithm to be used in recognition of wind speed curves.This version is a fetch to adapt it to the time series data.Section 3 presents various methods used in forecasting wind speed.In Section 4 we propose the MKF algorithm.Its performance is described in the next section with the presentation of the computational results.Finally, the last section presents the main conclusions of this study and about MKF algorithm.

II. RECOGNITION OF WIND SPEDDS CURVES
The K-means treats each observation in data as an object having a location in space.It performs a data partition by grouping them by a similarity criterion.In built groups, their objects are close to each other and, as far as possible, from objects in other clusters.
The K-means clustering algorithm [16] is one of the most widely used clustering methods, being based on the concept of hard-partition.
where ( ) to the center of the i th cluster, i c .η is a parameter that penalizes the change of clusters between elements of consecutive instants, but without effect when the new sample remains in the same cluster.
In this paper, the feature vector represents the past 12 hours wind speed values, taken from the k th instant.The half-daily wind speed k x is related by The main aim of the proposed forecasting model with a sub-model for each cluster is to find the relations between the pair wise vector k u and the matrix of speed wind prototypes ck.In the forecasting process the cluster is used to classify the wind speed profile to select the sub-model used for forecasting.Tuning is done using a Kalman filter.
The time series data is partitioned by K-means algorithms, for K=20.The centers of clusters i are shown in Figure 1. Figure 2 evidences the probability of exchange between clusters, from one instant to the next.In this section, we introduce the concept of wind speed forecasting model.Moreover, the mathematical models related with the different approaches are also presented.All forecasting models were implemented according to the general expression presented in equation 2, meaning that their output value is the current value of the time series ( k v ) and depends on the past measurements .
( ) In equation 2, F represents any one of the three models used, h is the headed time and p the order.In this work, the aim of the forecasting model is to predict a variable k v (wind speed, at the instant k) from independent past values k i v − , 1, , i p =  which are assumed as known.Results obtained from the application of the linear and non-linear models were confronted with the those from persistent method.The accuracy results of the forecasting models will be measured by the sum of errors expressed in absolute L1 norm or Root Mean Square (RMS or L2).Both error measures are easier to interpret, and they are expressed in the same units as the forecasted variable for a time horizon of n samples: ( ) Skill score can use L1 or L2, including a normalized version, by presenting them as a percentage improvement (equation 5).

( )
where Imp is equal to the improvement with respect to ref ξ (value for the reference approach, here in this work the persistent model response) and ξ the value for the advanced approach.Values below 100 correspond to accurate forecasts.

A. Persistent model
In the Persistent model, it is assumed that the forecast value of the time series is the last measured one.
Due to its simplicity, it is used as benchmarking for the various approaches.

B. AR model
The AR model structure is given by the following equation: AR model parameters ( i a , 1, , i p =  ) are estimated using variants of the least-squares method.

C. Conventional ARMA model
The ARMA model, denoted by ARMA(p, q) can be represented as: where c is a constant of the model, i a is the i th autoregressive coefficient, j b is the j th moving average coefficient, k e is the error at time period k and represents the observed or predicted value of wind speed at time instant k.

D. Kalman filter
The Kalman filter (KF) consists in an algorithm that uses a model with parameter uncertainty and a series of measurements containing random noise and other inaccuracies, observed over time, to produce estimates.
It works in a two-step process, where the first is for prediction.Here the KF performs estimates of the (a priori) current state variables, along with their uncertainties, usually assigned to (a priori) estimate covariance matrix.Once a new observation variable value is obtained, the state variable and the covariance matrix are both updated.This process starts with the calculation of the Kalman gain, (Step 1), which in conjunction with the error, is used to recalculate (a posteriori) an estimate of the output and adjusting the (a priori) state vector estimate (Step 2).The error covariance matrix is then calculated for the posteriori state vector and its projection obtained (Step 3 and 4).For the next iteration an a priori estimate of the state vector is made using the model of the system (Step 5).The mentioned steps are repeated iteratively.All equations used in this algorithm can be found in [17] [18].The KF model, at time k, assumes the true state, k s , and is evolved from the previous state (k −1) according to where Ak is the state transition model which is applied to the previous state 1| 1 k k − − s ; k w is the process noise, statistically characterized as a multivariate normal distribution with zero means and covariance Q, i.e.
( ) In discrete domain time k, an observation (or measurement) k v of the true state k s is made according to: Equation ( 10) represents the TVSSM model.In this model, k υ is the observation noise (zero mean Gaussian white noise with covariance R) and Ck is the observation model that maps the true state space into the observed space.
Because of its recursive nature, the algorithm can run in real time (here referred as online), but also based on a previous learning process with historical data (offline model).In the first case, it uses only the present input measurements and the previously calculated state.The model parameters are continuously tunned and no additional past information is required.In the last case, parameters of the model are static or restricted to an acceptable range of values, which resulted from an offline learning process.In this work, both processes were used.
In this work, s are the parameters of the forecasting model while is the vector with the past 12 th hours of observed wind speed values.

E. MKF algorithm
The MKF forecasting model (MKFM) is a multi-model structure learned by the K-means algorithm presented in section II, with a number of sub-models equals to the number of clusters.So, MKFM is a non-linear switched model selected by a classifier based on clustering.Each sub-model is a Linear Time-Varying System based on equations ( 9)- (10).Each parameter of the model is tuned by the KF.For each wind profile, [ ] model is selected based on the cluster classifier.This is used to predict the wind speed 1 k v + , at time k+1.The learning method is divided into three phases: Step 1 -Structural Learning: first, values of the wind from the last 12 hours are clustered based on the degree of similarity between data.So, the K-means algorithm detects patterns in existing data in order to form the most homogeneous groups.The original time series is partitioned into a number of different clusters, and characterized by the partition matrix U and the cluster centres, c, corresponding to a wind speed typical curve (curves prototypes).Each cluster is associated to a sub-model.
Step 2 -Select sub-model and forecasting: For each wind profile 1 k x − select a sub-model according to the cluster classifier result.The classification result is expressed by the matrix U.If , 1 i k u = , the i th cluster is selected.Next, use TVSSM to build the prediction models in the forecasting horizon based on equation (10).
Step 3 -Tuning MKFM parameters: Use Kalman filter for adjusting the weights of parameters of i th model, s, which are state variables of equation ( 9), where A is asymptotically stable in sense of Lyapunov stability.

IV. RESULTS
In this section, the results obtained from testing the presented five algorithms are discussed.They are the Persistent, the ARIMA, the AR, the RLS and the proposed MKF in run online and offline versions.All models forecast the wind speed mean one hour ahead.
The main results are now presented and summarized in Table I.They are analysed using the RMS error and compared with the benchmark persistent method according to the percentage of improvement defined on equation 5.The last column of the table contains additional information about architecture, i.e. the number of sub-models and number of parameters for each model.
The results of the ARIMA model are in concordance with the work of Torres and co-workers.They compared the ARIMA based models with the persistence-based models [19].It was shown that for short-term prediction horizons the persistence model presents best results than the ARIMA based models.Only for long-term horizons the ARIMA models present better performance.The order of the ARIMA model was chosen aiming to improve the accuracy of the forecasting response.
The performance of the AR model was shown to be significantly better than the ARIMA and 6.8% better than the Persistent model.Due to the similarity between the AR and RLS forecasting models their results are practically the same.The proposed MKF model was shown to be the best forecasting model.It was 65% better than the persistent model and 60% better than the AR/RLS models.
In Figure 3 is plotted the response of all forecasting models for an interval period of 100 hours.
Figure 4 shows the number of sub-model of MKF (number of cluster) selected for forecasting and tuned by the Kalman filter.
The analysis suggests that the non-linear MKF models present better performance than the linear AR and ARMA, suggesting greater ability to understand the characteristics of this particular time series.Their lower estimate errors, both for the train and test periods, evidence that the proposed model, known the values of wind pattern curves and the cluster classifier, has a good performance.

V. CONCLUSIONS
In this paper a comparison of various time series forecasting approaches, based on the mean hourly wind speed, was presented.Results obtained indicated that the proposed MKF based models outperformed the respective linear and all non-linear approach when compared with the L1 and L2 errors.Moreover, results suggest that the proposed method is a robust and accurate forecast model with RMS errors in the range below of 0.2 ms -1 , meaning that it can be used for simulation and to predict wind speed with 1 day anticipation and showing no degradation in the considered lead time.

.
representing a finite set of feature vectors, with m i ∈ x R where m is the dimension of the features space and n is the number of objects (measurements), into K clusters.Each cluster is represented by a prototype n i ∈ c R , 1 i K ≤ ≤ .The membership degree the degree of belongingness of data object k x to prototype i, with , 1 i k u = if it belongs to cluster k or , 0 i k u = if it does not.All membership degrees form a membership matrix Clustering is formulated as a constrained minimization problem, imposed in the membership functions:

Figure 2 .
Figure 2. Probability for exchange clusters in each time instant

Figure 3 .
Figure 3. Wind speed forecasting of the 4 models and real wind speed wind (blue line) (test phase).

Figure 4 .
Figure 4. Number of Cluster/KF sub-model used for forecasting of wind speed.

TABLE I .
FORECASTING ERRORS FOR THE TEST PERIOD 2018 13th APCA International Conference on Automatic Control and Soft Computing (CONTROLO) June 4-6, 2018, Ponta Delgada, Azores, Portugal