# Day-Ahead Wind Speed Forecasting Using Relevance Vector Machine

Authors: Guoqiang Sun; Yue Chen; Zhinong Wei; Xiaolu Li; Kwok W. Cheung
Journal: Journal of Applied Mathematics
 (2014)

---

## Abstract

With the development of wind power technology, the security of the power system, power quality, and stable operation will meet new challenges. So, in this paper, we propose a recently developed machine learning technique, relevance vector machine (RVM), for day-ahead wind speed forecasting. We combine Gaussian kernel function and polynomial kernel function to get mixed kernel for RVM. Then, RVM is compared with back propagation neural network (BP) and support vector machine (SVM) for wind speed forecasting in four seasons in precision and velocity; the forecast results demonstrate that the proposed method is reasonable and effective.


---

## Body

## 1. Introduction

Over the past decade, people in many countries worldwide have paid significant attention to wind power generation because of it being pollution-free, clean, and renewable. At the end of 2012, worldwide installed capacity of wind power reached 282.2 GW, increased almost 20% compared to the previous year 2011 which of 240 GW. By the end of 2020, total global installed capacity will reach 1150 GW, and wind power will be over 2800 TWh, accounting for about 12% of global electricity demand; by the end of 2030, installed capacity will exceed 2500 GW, and wind power generating capacity will reach 6600 TWh, accounting for about 23% of global electricity demand [1]. The introduction of such a large-scale wind power has attracted many domestic and foreign scholars for further wind power technology. The wind forecast as a basic link of the wind power research is one of the effective ways to solve the problem and has an important role in the safe and economic operation of the power grid, so a growing number of researchers pay attention to it recently.We can cluster the wind forecasting techniques into two main groups; the first group are physical methods, taking physical considerations into account, such as temperature and local terrain. In [2, 3], numerical weather prediction (NWP) model could be used directly for wind speed and wind energy predictions.Another group are statistical methods. Conventional ones are identical to the direct random time-series model, such as autoregressive model (AR), moving average model (MA), autoregressive moving average model (ARMA), and autoregressive integrated moving average model (ARIMA). Kamal and Jafri [4] established an ARMA model and found for long-term or short-term predictions, the values of variances and wind speed with a confidence interval of 95% were acceptable. A fractional-ARIMA (f-ARIMA) model was used by Kavasseri and Seetharaman [5] for day-ahead and two-day-ahead wind speed forecasting. Results showed that forecast accuracy was significantly improved with f-ARIMA model compared to the previous method.Apart from the mentioned forecasting techniques, machine learning algorithms such as artificial neural network (ANN), Bayesian network (BN), and support vector machine (SVM) are usually adopted for time series-based wind prediction. Bilgili et al. [6] investigated the use of a model based on the ANN method and spatial correlation for monthly wind speed prediction without any topographic details or other meteorological data. The prediction results showed that the maximum MAE was 14.13%, while the minimum was 4.49% in the developed model. Welch [7] compared three types of neural networks (multilayer perceptron neural network, simultaneous recurrent neural network, and Elman recurrent neural network) for short-term prediction of wind speed, and all training data used particle swarm optimization (PSO). Mohandes et al. [8] established a SVM model to predict wind speed, compared with a multilayer perceptron ANN model. The results showed that SVM model gave lower root mean square error than the MLP ANN model. Larson and Westrick [9] used a support vector classifier to estimate the forecasting error, obtaining lower mean square error and mean absolute percentage error than traditional SVM.However, the SVM had a number of significant and practical limitations. For example, we could not get probabilistic predictions and the kernel function must satisfy Mercer’s condition. In order to overcome these, Tipping [10] and Tipping and Faul [11] proposed an advanced function estimation technique, relevance vector machine (RVM). RVM utilizes a more flexible and sparser function without extra regularization parameters; it is an inherent machine learning technique [12].This paper establishes RVM model to forecast day-ahead wind speed in JiangSu, compared with BP and SVM models. It can show that the proposed method is more effective and robust and gets rid of the overfitting problem of traditional nonparametric regression models. The rest of the paper is organized as follows. A brief review of the theory of RVM learning for classification is provided in Section2. Then, in Section 3, several forecasting examples are given to contrast RVM model with other different models. Finally Section 4 will give the conclusions.


## 2. Classical Relevance Vector Machine

Relevance vector machine (RVM), based on the overall Bayesian framework, is a sparse probability model and now is one of the hot research fields [13]. The principle is as follows.Given a training dataset{
x
i
,
t
i
}
i
=
1
N (i
=
1,2
,
…
,
N), where {
x
i
}
i
=
1
N are the N-dimensional input vectors and {
t
n
}
i
=
1
N are output vectors. Here we assume that the targets are independent and contaminated with zero mean random error (noise) vector ε
=
(
ε
1
,
…
,
ε
N
)
T, where ε
i
~
N
(
0
,
σ
2
) (i
=
1,2
,
…
,
N) and N
(
0
,
σ
2
) is the normal distribution with mean 0 and variance σ
2. The output can be defined as
(1)
t
i
=
y
(
x
i
,
ω
)
+
ε
i
,
where the weights ω
=
(
ω
0
,
ω
1
,
…
,
ω
N
)
T and y
(
x
,
ω
), as a linearly-weighted sum of N, is generally fixed and nonlinear.Consider(2)
y
(
x
,
ω
)
=
∑
i
=
1
N
‍
ω
i
K
(
x
,
x
n
)
+
ω
0
=
Φ
ω
,
where
(3)
Φ
=
[
1
K
(
x
1
,
x
1
)
K
(
x
1
,
x
2
)
⋯
K
(
x
1
,
x
N
)
1
K
(
x
2
,
x
1
)
K
(
x
2
,
x
2
)
⋯
K
(
x
2
,
x
N
)
⋮
⋮
⋮
⋮
⋮
1
K
(
x
N
,
x
1
)
K
(
x
N
,
x
2
)
⋯
K
(
x
N
,
x
N
)
]
,
where K
(
x
,
x
n
) is a kernel function.Therefore, the probability formula for relevance vector machine model is(4)
p
(
t
i
∣
x
)
~
N
(
y
(
x
i
)
,
σ
2
)
,
where N
(
y
(
x
i
)
,
σ
2
) is the normal distribution with mean y
(
x
i
) and variance σ
2.Because we assume the targets are independent, thus the likelihood of the complete dataset can be defined as(5)
p
(
t
∣
w
,
σ
2
)
=
(
2
π
σ
2
)
-
N
/
2
exp
⁡
{
-
1
2
σ
2
∥
t
-
Φ
w
∥
2
}
.Because there are so many parameters in the model as training examples, maximum likelihood estimation ofw and σ
2 would easily lead to overfitting. To avoid this, the sparse Bayesian principles are utilized to give w zero-mean Gaussian prior distribution:
(6)
p
(
w
∣
α
)
=
∏
i
=
0
N
‍
N
(
ω
i
∣
0
,
α
i
-
1
)
,
where α are the N
+
1 dimensional vectors and each weight separately corresponds to a hyperparameter which controls how far from zero each weight is allowed to deviate [13]. Having defined the prior, using Bayes’ rule, noninformative prior distribution can be given by
(7)
p
(
ω
,
α
,
σ
2
∣
t
)
=
p
(
t
∣
ω
,
α
,
σ
2
)
p
(
ω
,
α
,
σ
)
∫
‍
p
(
t
∣
ω
,
α
,
σ
2
)
p
(
ω
,
α
,
σ
2
)
d
ω
d
α
d
σ
2
.However, we cannot easily gain the full analytical solution to (7); thus, we decompose the posterior according to p
(
ω
,
α
,
σ
2
∣
t
)
=
p
(
ω
∣
t
,
α
,
σ
2
)
p
(
α
,
σ
2
∣
t
) and get the solution to this integral (7). Then, the posterior distribution over the weights can be written by
(8)
p
(
ω
∣
t
,
α
,
σ
2
)
=
p
(
t
∣
ω
,
σ
2
)
p
(
ω
∣
α
)
p
(
t
∣
α
,
σ
2
)
.After defining the prior distribution and the likelihood distribution, according to Bayes’ theorem, we can obtain the posterior distribution of all unknown parameters:(9)
p
(
ω
∣
t
,
α
,
σ
2
)
=
N
(
μ
,
Σ
)
.Then the mean and the covariance ofN
(
μ
,
Σ
) are expressed as
(10)
Σ
=
(
σ
-
2
Φ
T
Φ
+
A
)
-
1
,
(11)
μ
=
σ
-
2
Σ
Φ
T
t
,
where A
=
diag
⁡
(
α
0
,
α
1
,
…
,
α
N
).In order to calculateα and σ
2, using the maximum likelihood calculation, we need to only maximize the term p
(
t
∣
α
,
σ
2
):
(12)
p
(
t
∣
α
,
σ
2
)
=
∫
‍
p
(
t
∣
ω
,
σ
2
)
p
(
ω
∣
α
)
d
ω
=
(
(
2
π
)
-
N
/
2
|
Ω
|
)
exp
⁡
(
-
1
2
t
T
Ω
-
1
t
)
,
where Ω
=
σ
2
+
Φ
A
-
1
Φ
T.In related Bayesian models, this quality is referred to as “the marginal likelihood’’ [14, 15] or the “evidence for hyperparameter’’ [16]; its maximization is known as the “type II maximum likelihood method’’ or “evidence procedure.’’Because we cannot obtain values ofα and σ
2 which maximize (12) in closed form, so here an iterative reestimation method is needed. We partially differentiated (12) and made α equal to 0; then, the following approach gives [17]
(13)
p
(
t
∣
α
,
σ
2
)
d
α
=
0
⟶
α
i
new
=
γ
i
μ
i
2
,
where μ
i is the posterior mean weight at time of i from (11), and the quantity γ
i can be defined as
(14)
γ
i
≡
1
-
α
i
Σ
i
i
,
where the Σ
i
i is the diagonal element at time of i of the posterior weight covariance (10).Whenα
i is large, ω
i is highly constrained by the prior, and then Σ
i
i
≈
α
i
-
1 and γ
i
≈
0; conversely, when α
i is small, we can know that γ
i
≈
1. So γ
i can be interpreted as the intermediate variables measuring the best parameter α
i.Meanwhile, for the noise varianceσ
2, differentiation of (12), equating to 0, then the following approach gives [16]
(15)
p
(
t
∣
α
,
σ
2
)
d
σ
2
=
0
⟶
(
σ
2
)
new
=
∥
t
-
Φ
μ
∥
2
N
-
Σ
i
=
0
N
γ
i
,
where N is the number of data examples.In practice, because many ofα
i are found to tend to infinity during reestimation, the posterior distribution from formula (9) of the corresponding weights w
i will highly peak at zero. In this optimization process, those w
i become zero, and the vectors from the training set that associate with the remaining nonzero weights w
i are called relevance vectors.At convergence of the hyperparameter estimation procedure, we use the posterior distribution over the weights for predictions, conditioned on the maximizing valuesα
M
P and σ
M
P
2, which are optimum values used for prediction through iteration. Then the predictive distribution can be written as
(16)
p
(
t
*
∣
t
,
α
M
P
,
σ
M
P
2
)
=
∫
‍
p
(
t
*
∣
ω
,
σ
M
P
2
)
p
(
ω
∣
t
,
α
M
P
,
σ
M
P
2
)
d
ω
.Because both terms in the integrand obey Gaussian distribution, we can easily compute the predictive distribution:(17)
p
(
t
*
∣
t
,
α
M
P
,
σ
M
P
2
)
=
N
(
t
*
∣
y
*
,
σ
*
2
)
,
where the new input values are x
* and
(18)
y
*
=
μ
T
Φ
(
x
*
)
,
(19)
σ
*
2
=
σ
M
P
2
+
Φ
(
x
*
)
T
Σ
Φ
(
x
*
)
.Eventually, we get the regression model of RVM in function (18) and the variance function in function (19).In summary, the forecast process can be summarized as in the following steps:(1)
initialize variancesσ
2 and hyperparameters α
i;
(2)
compute posteriori statistics of weightsμ and Σ;
(3)
computey
i and update the α
i and σ
2;
(4)
if it is not convergent, then go back step (2); otherwise, go to step (5);
(5)
ifα
i tend to infinity, the weights ω
i can be deleted;
(6)
get the predictive mean intuitively fromy
(
x
*
,
μ
).


## 3. Illustrative Examples

### 3.1. Data and Pretreatment

In this study, wind speed values throughout 2008 on a wind farm in Jiangsu are taken as the training samples, and all the data have an interval period of 15 min. To evaluate the performance of proposed model, we establish RVM model for 96 points wind speed prediction, compared with SVM and BP in terms of forecast accuracy, model running time, and model complexity. Based on historical data in each quarter, we establish forecasting models to predict day-ahead wind speed on March 25, June 26, September 29, and December 28.Because the input vectors contain different kinds of physical quantities, in order to ensure the variables are comparable, but also solve problems such as the increasing of training time, first of all, we take normalization process on all input data. The normalized respective variables will be in[
0,1
]
(20)
x
i
*
=
x
i
-
x
min
⁡
x
max
⁡
-
x
min
⁡
,
where x
max
⁡ and x
min
⁡ are, respectively, the maximum value and the minimum value for each variable.For evaluating the forecasting performance, mean relative error (MRE) and root mean square error (RMSE) are used; they are defined in functions(21)
e
MRE
=
1
n
∑
i
=
1
n
‍
|
Y
i
-
Y
^
i
|
|
Y
i
|
,
e
RMSE
=
1
n
∑
i
=
1
n
‍
(
Y
i
-
Y
^
i
)
2
,
where Y
i and Y
^
i indicate actual and forecasting values of wind speed at time of i.


### 3.2. Select Kernel Function of RVM

Because the kernel function of RVM does not need to satisfy Mercer’s condition, the selection of the kernel function has a certain degree of freedom. The basic idea of the hybrid kernel function [17] is that several kernel functions can be combined together for different nature, and the new properties can be integrated and reflected.In this paper, we combine Gaussian kernel function and polynomial kernel function to get mixed kernel of global and local nature:(22)
K
(
x
,
x
i
)
=
λ
G
(
x
,
x
i
)
+
(
1
-
λ
)
P
(
x
,
x
i
)
,
G
(
x
,
x
i
)
=
exp
⁡
(
-
∥
x
-
x
i
∥
2
σ
2
)
,
P
(
x
,
x
i
)
=
(
x
·
x
i
+
1
)
2
,
where G
(
x
,
x
i
) is RBF kernel function; P
(
x
,
x
i
) is binomial kernel function; λ is the weight of the kernel function; and σ is the kernel width. There, the grid search method is employed to get the optimal values of λ and σ.


### 3.3. Different Forecasting Models

To evaluate the performance of proposed model, RVM, BP, and SVM are established for day-ahead wind speed predictions on March 25, June 26, September 29, and December 28. Table1 shows the comparisons of forecast accuracy for three models in each quarter, and Table 2 shows the comparisons of test time and number of vectors or neurons for three models. The specific forecasting results are presented in Figure 1.Table 1
Comparisons of forecast accuracy for three models.
Month
BP
SVM
RVM
RMSE
MRE
RMSE
MRE
RMSE
MRE
March
0.1123
0.0180
0.0925
0.0115
0.0782
0.0108
June
0.1856
0.0520
0.2033
0.0428
0.1607
0.0347
September
0.3521
0.0641
0.2297
0.0230
0.2451
0.0185
December
0.1106
0.0136
0.0930
0.0057
0.0790
0.0046
Avg.
0.1902
0.0369
0.1546
0.0208
0.1408
0.0172Table 2
Comparisons of test time and vector number for three models.
Month
BP
SVM
RVM
Test time (s)
Number of vectors or neurons involved
Test time (s)
Number of vectors or neurons involved
Test time (s)
Number of vectors or neurons involved
March
677.56
300
639.24
216
302.48
33
June
1237.43
380
857.25
306
288.87
40
September
1002.86
340
641.91
320
293.85
35
December
835.03
320
506.29
202
288.66
31
Avg.
938.21
335
661.17
261
293.47
34.75Forecasting results with different models on March 25 (a), June 26 (b), September 29 (c), and December 28 (d).
(a)
(b)
(c)
(d)It is found from the comparison results that the forecast accuracy of the proposed method is higher than that used by the other models. The average RMSE of RVM model is only 0.1408 m/s, lower than those of BP and SVM, which are 0.1902 m/s and 0.1546 m/s. The average MRE of RVM is 1.72%, while those of BP and SVM are 3.69% and 2.08%. In different seasons, forecast accuracy is different. In spring and winter, wind speed changes are relatively small, so higher precision can be got; in summer and autumn, wind speed at the coast has large fluctuations, so the accuracy will decrease.Table2 shows clearly that RVM model can reduce model complexity; the average number of vectors or neurons involved is only 34.75, and comparatively those of BP and SVM are 335 and 261. Although RVM typically utilizes dramatically fewer kernel functions, its generalization performance is comparable to SVM. From Table 2, we know that RVM has a higher sparse network and can quickly converge; its test time is 293.47 s, shorter than those of BP (938.21 s) and SVM (661.17 s) models.


## 3.1. Data and Pretreatment

In this study, wind speed values throughout 2008 on a wind farm in Jiangsu are taken as the training samples, and all the data have an interval period of 15 min. To evaluate the performance of proposed model, we establish RVM model for 96 points wind speed prediction, compared with SVM and BP in terms of forecast accuracy, model running time, and model complexity. Based on historical data in each quarter, we establish forecasting models to predict day-ahead wind speed on March 25, June 26, September 29, and December 28.Because the input vectors contain different kinds of physical quantities, in order to ensure the variables are comparable, but also solve problems such as the increasing of training time, first of all, we take normalization process on all input data. The normalized respective variables will be in[
0,1
]
(20)
x
i
*
=
x
i
-
x
min
⁡
x
max
⁡
-
x
min
⁡
,
where x
max
⁡ and x
min
⁡ are, respectively, the maximum value and the minimum value for each variable.For evaluating the forecasting performance, mean relative error (MRE) and root mean square error (RMSE) are used; they are defined in functions(21)
e
MRE
=
1
n
∑
i
=
1
n
‍
|
Y
i
-
Y
^
i
|
|
Y
i
|
,
e
RMSE
=
1
n
∑
i
=
1
n
‍
(
Y
i
-
Y
^
i
)
2
,
where Y
i and Y
^
i indicate actual and forecasting values of wind speed at time of i.


## 3.2. Select Kernel Function of RVM

Because the kernel function of RVM does not need to satisfy Mercer’s condition, the selection of the kernel function has a certain degree of freedom. The basic idea of the hybrid kernel function [17] is that several kernel functions can be combined together for different nature, and the new properties can be integrated and reflected.In this paper, we combine Gaussian kernel function and polynomial kernel function to get mixed kernel of global and local nature:(22)
K
(
x
,
x
i
)
=
λ
G
(
x
,
x
i
)
+
(
1
-
λ
)
P
(
x
,
x
i
)
,
G
(
x
,
x
i
)
=
exp
⁡
(
-
∥
x
-
x
i
∥
2
σ
2
)
,
P
(
x
,
x
i
)
=
(
x
·
x
i
+
1
)
2
,
where G
(
x
,
x
i
) is RBF kernel function; P
(
x
,
x
i
) is binomial kernel function; λ is the weight of the kernel function; and σ is the kernel width. There, the grid search method is employed to get the optimal values of λ and σ.


## 3.3. Different Forecasting Models

To evaluate the performance of proposed model, RVM, BP, and SVM are established for day-ahead wind speed predictions on March 25, June 26, September 29, and December 28. Table1 shows the comparisons of forecast accuracy for three models in each quarter, and Table 2 shows the comparisons of test time and number of vectors or neurons for three models. The specific forecasting results are presented in Figure 1.Table 1
Comparisons of forecast accuracy for three models.
Month
BP
SVM
RVM
RMSE
MRE
RMSE
MRE
RMSE
MRE
March
0.1123
0.0180
0.0925
0.0115
0.0782
0.0108
June
0.1856
0.0520
0.2033
0.0428
0.1607
0.0347
September
0.3521
0.0641
0.2297
0.0230
0.2451
0.0185
December
0.1106
0.0136
0.0930
0.0057
0.0790
0.0046
Avg.
0.1902
0.0369
0.1546
0.0208
0.1408
0.0172Table 2
Comparisons of test time and vector number for three models.
Month
BP
SVM
RVM
Test time (s)
Number of vectors or neurons involved
Test time (s)
Number of vectors or neurons involved
Test time (s)
Number of vectors or neurons involved
March
677.56
300
639.24
216
302.48
33
June
1237.43
380
857.25
306
288.87
40
September
1002.86
340
641.91
320
293.85
35
December
835.03
320
506.29
202
288.66
31
Avg.
938.21
335
661.17
261
293.47
34.75Forecasting results with different models on March 25 (a), June 26 (b), September 29 (c), and December 28 (d).
(a)
(b)
(c)
(d)It is found from the comparison results that the forecast accuracy of the proposed method is higher than that used by the other models. The average RMSE of RVM model is only 0.1408 m/s, lower than those of BP and SVM, which are 0.1902 m/s and 0.1546 m/s. The average MRE of RVM is 1.72%, while those of BP and SVM are 3.69% and 2.08%. In different seasons, forecast accuracy is different. In spring and winter, wind speed changes are relatively small, so higher precision can be got; in summer and autumn, wind speed at the coast has large fluctuations, so the accuracy will decrease.Table2 shows clearly that RVM model can reduce model complexity; the average number of vectors or neurons involved is only 34.75, and comparatively those of BP and SVM are 335 and 261. Although RVM typically utilizes dramatically fewer kernel functions, its generalization performance is comparable to SVM. From Table 2, we know that RVM has a higher sparse network and can quickly converge; its test time is 293.47 s, shorter than those of BP (938.21 s) and SVM (661.17 s) models.


## 4. Conclusions

In this paper, RVM is proposed for day-ahead wind speed forecasting. Firstly, we combine Gaussian kernel function and polynomial kernel function to get mixed kernel for RVM model. Then, we compare RVM with BP and SVM for wind speed forecasting in four seasons for precision and velocity. Finally, the simulation results show that the proposed method is more effective and robust and has better performance in terms of forecast accuracy, model running time, and model complexity than that used by BP neural network and SVM model. So the theoretical feasibility of RVM for the wind speed prediction has the some meaning.



---

*Source: 437592-2014-06-12.xml*