# Hybrid Improved Bird Swarm Algorithm with Extreme Learning Machine for Short-Term Power Prediction in Photovoltaic Power Generation System

Authors: Dongchun Wu; Jiarong Kan; Hsiung-Cheng Lin; Shaoyong Li
Journal: Computational Intelligence and Neuroscience
 (2021)

---

## Abstract

When a photovoltaic (PV) system is connected to the electric power grid, the power system reliability may be exposed to a threat due to its inherent randomness and volatility. Consequently, predicting PV power generation becomes necessary for reasonable power distribution scheduling. A hybrid model based on an improved bird swarm algorithm (IBSA) with extreme learning machine (ELM) algorithm, i.e., IBSAELM, was developed in this study for better prediction of the short-term PV output power. The IBSA model was initially used to optimize the hidden layer threshold and input weight of the ELM model. Further, the obtained optimal parameters were input into the ELM model for predicting short-term PV power. The results revealed that the IBSAELM model is superior in terms of the prediction accuracy compared to existing methods, such as support vector machine (SVM), back propagation neural network (BP), Gaussian process regression (GPR), and bird swarm algorithm with extreme learning machine (BSAELM) models. Accordingly, it achieved great benefits in terms of the utilization efficiency of whole power generation. Furthermore, the stability of the power grid was well maintained, resulting in balanced power generation, transmission, and electricity consumption.


---

## Body

## 1. Introduction

The ecological environment on earth is significantly threatened due to the large consumption of fossil energy [1]. Therefore, renewable energy resources have been exploited and widely applied to reduce nonrenewable energy consumption globally [2–4]. Among the various sources of renewable energy, solar energy has attracted a lot more attention in recent years [5, 6]. However, Shafi et al. [7] indicated that photovoltaic (PV) power generation might suffer some drawbacks, such as randomness and unpredictability. The imbalance between supply and demand is bound to lead to a long-term inefficiency in the power distribution. Essentially, weather conditions are found to be the key factor in intermittent and unstable PV power generation. Consequently, their impact on the PV power generation forecast must be considered [8]. For the power forecast study, the PV system can be classified into ultra-short, short, medium, and long periods [9]. The ultra-short power forecast generally takes 0–4 hours, while the short power forecast takes 1–3 days. The medium- and long-term power predictions usually take one week and one month, respectively. Among the four time periods, the short power forecast plays a crucial role in power dispatching [10–12].At present, the primary method employed for ultra-short-period power forecast in the PV output power is the satellite nephogram used to predict the light intensity for the subsequent few hours [13, 14]. Short-term power prediction collects the meteorological data from the weather forecast for the upcoming 1–3 days [15]. However, medium- and long-term power predictions employ statistical methods based on historical data [16]. It is necessary to establish a PV power prediction model that can fit varying weather conditions for advanced technology development [17]. PV power prediction methods can be classified into indirect or direct prediction [18]. Indirect prediction approaches predict the solar radiation intensity from meteorological data and satellite images to obtain output power [19, 20]. Alternatively, the direct prediction method directly predicts the PV generation power based on the past power generation data, weather data, and future weather forecasts [21, 22]. In this study, a hybrid improved bird swarm algorithm (IBSA) with an extreme learning machine (ELM) model has been established to forecast PV power, based on the direct prediction principle. The main contributions of this study are as follows:(1)
The optimization ability of traditional BSA was enhanced using improved BSA (IBSA).(2)
IBSA was used to optimize the ELM model. As a result, the PV power generation forecast based on ELM model was able to achieve better performance.(3)
The power generation scheduling could be arranged more reasonably and the safety in the electrified wire netting was therefore ensured.


## 2. Literature Review

Currently, various algorithms that use direct prediction methods have been reported to predict PV power generation [23, 24], which are mainly classified into linear forecast methods, nonlinear forecast methods, and mixed forecast methods [18]. The time series prediction method and time trend extrapolation method belong to linear forecast methods [25, 26]. However, linear forecast methods may produce a large deviation when there are great changes in the external environment such as weather or temperature [27, 28]. Nonlinear forecast methods are more suitable for PV power output prediction, which generally employ artificial neural network (ANN), Gaussian process regression (GPR), extreme learning machine (ELM), support vector machine (SVM), and more [29, 30].ANN is a mathematical model that imitates the biological neural network. Nespoli et al. [31] used two ANNs to predict the output power of the PV system. On sunny days, the results exhibit a good and stable prediction performance. However, on cloudy days, the forecasting results became evidently worse. Rocha et al. [32] adopted ANN to predict the PV power using temperature and radiation data collected from different locations, revealing that the experimental results were close to the actual values. However, the prediction accuracy may be sensitive to weather conditions. Khan et al. [33] proposed a hybrid power forecasting model for PV plants, using back propagation neural network (BP) with an air quality index (AQI). Although the prediction error was small in the haze weather, it requires tremendous data and computational time. On the other hand, GPR is an extension model of a multivariate Gaussian distribution in machine learning, signal processing, and more. For instance, Sheng et al. [34] applied the GPR method to predict PV power. Cheng et al. [9] proposed an improved sparse GPR model with an improved least square support vector machine (SVM) model for PV output power prediction.SVM is known for its superior capability of structural risk minimization and operation speed [35, 36]. Wang et al. [37] combined SVM with the K-nearest neighbors (KNN) algorithm for PV power generation prediction, demonstrating that the accuracy rate of SVM was higher using fewer samples; however, KNN was found to be more accurate than SVM when the sample number was sufficient. Aprillia et al. [38] proposed a PV generation prediction strategy which combined a convolution neural network (CNN) with a salp swarm algorithm (SSA), i.e., CNN-SSA. When compared to long short-term memory (LSTM) method combined with SSA (LSTM-SSA), and the SVM method combined with SSA (SVM-SSA), CNN-SSA exhibited superior performance regarding PV power generation prediction. Yang et al. [39] used the grey relevance theory to find the major elements that may affect the consumption of clean energy. Moreover, the least squares support vector machine (LSSVM) was optimized by evolutionary game theory (EGT) and the adaptive differential evolution (ADE) algorithm. It was confirmed to work well in the generalization ability and prediction effect. VanDeventer et al. [22] developed a short-term forecast model using SVM with genetic algorithm (SVMGA). The prediction error received was found to be smaller than that in traditional SVM. However, it is sensitive to the parameter values of the model and is unsuitable for training large-scale samples.Fast learning speed and good generalization are the two main advantages of ELM [40, 41]. Liu et al. [42] used ELM to predict the short-period PV power generation. The weights of the ELM algorithm were updated via particle swarm optimization (PSO) algorithms. Although it has a desirable forecast effect, the computational complexity was increased. Zhou et al. [41] proposed a prediction model using similar day analysis and genetic algorithm to optimize ELM (SDA-GA-ELM) and enhance the forecast precision. The results of its application on PV output power prediction showed that the SDA-GA-ELM model improves the prediction accuracy of ELM. Luo et al. [43] combined deep learning with a stacked ELM model. The generalized entropy criterion was then used to improve the prediction efficiency. The results revealed its prediction effect to be better than ANN and ELM models.Intelligent algorithms have been widely applied to improve the performance of prediction models. For instance, the PSO algorithm is a random search algorithm based on group cooperation. Behera et al. [42] proposed PSO to optimize the prediction performance of the ELM model. The chicken swarm optimizer (CSO) algorithm can simulate the hierarchical system and activity behavior of a swarm. Liu et al. [44] used the CSO to optimize the key parameters of the ELM model, thus improving the prediction of the output power from the PV power generation. The ant colony optimization (ACO) algorithm is a highly innovative metaheuristic algorithm inspired by ant foraging behavior. Li et al. [45] applied ACO algorithms to optimize the BP neural network for the prediction of the number of people participating in the make-up exam. The results revealed that the optimized BP neural network has a desirable prediction performance. The bird swarm algorithm (BSA) proposed by Meng et al. [46] is a global optimization algorithm used to simulate bird swarm behavior. Unfortunately, it is easy to fall into a local optimum at the high-dimensional multiextremum problem. In an advanced application, Alhassan and Wan Zainon [47] combined the Taylor series with BSA to optimize a classification model for the diagnosis of heart diseases. Besides, Huang and Sheng [48] proposed a hybrid bird swarm optimization algorithm to optimize the identification model in a thermal power plant. However, its operation time may be too long to be applied in a real circumstance.


## 3. The Proposed Prediction Model

### 3.1. Bird Swarm Algorithm and Improved Bird Swarm Algorithm

The bird swarm algorithm (BSA) was originally inspired from the flight and foraging behavior of birds in nature. Its processing rules are shown as follows [46, 49]:(1)
Foraging behavior or vigilance behavior can be chosen by each bird.(2)
The best information within the group and the individual can be recorded by each bird and shared within the group.(3)
When the bird chooses the vigilance behavior, it will move to the center of the group, and there is competition during the process of movement.(4)
The birds periodically migrate to the next location. Then, the producer can be selected using the best fitness. In the meanwhile, the scrounger can be selected using the worst fitness, and other producers or scroungers are randomly selected from the remaining birds.(5)
Scroungers will follow producers to find food.Let there beM birds. The time step is denoted as t, and the location of the ith bird in the jth dimension is di,jt.The rule (2) can be expressed as(1)di,jt+1=di,jt+Rbi,j−di,jtrand0,1+Dzj−di,jtrand0,1,where rand0,1 is an independent uniformly distributed random variable on the interval [0, 1]; R is the cognitive coefficient; D is the accelerated coefficient; di,jt represents the position at t; bi,j is the best location of the ith bird; and zj is the best place.When birds keep vigilance, their location is updated as follows:(2)di,jt+1=di,jt+E1dmean,j−di,jtrand0,1+E2bm,j−di,jtrand−1,1,(3)E1=e1exp−fiMsumf+ε,(4)E2=e2expfi−fmfi−fm+εfmMsumf+ε,where dmean,j represents the average position of the whole swarm in jth dimension; rand−1,1 is an independent uniformly distributed random variable on the interval [−1, 1]; m is a randomly selected positive integer (m≠i) where m∈1,M≠i; bm,j represents the best previous position of the mth bird and fm is the optimal fitness value of the mth bird; e1 and e2 are the constants between 0,2; fi represents the optimal fitness value of the ith bird and sumf denotes the sum of the optimal fitness values in a bird swarm; and ε is an infinitesimal quantity.The location update equation for producers is as follows:(5)di,jt+1=di,jt+di,jtrand0,1.The location update equation for scroungers is as follows:(6)di,jt+1=di,jt+FLdm,jt−di,jtrand0,1.In equation (6), FL represents the following coefficient, where FL∈0,2. dm,jt denotes the position of the mth bird.The producer location is updated as follows:(7)di,jt+1=atdi,jt+di,jtrand0,1,at=amax−amincosttmaxπ+amin,where t denotes the current iteration number and tmax is the maximum iteration number; at represents the adaptive learning coefficient of the producer, which is the function of a cosine; and amax and amin are the maximum and minimum learning coefficients, respectively. In this study, amax is set as 0.9, and amin is set as = 0.4.The relative change rate of the scrounger’s fitness valuek is defined as(8)k=fi−fbfb.In equation (8), the best fitness value of the ith scrounger is fi and the best fitness value of the bird swarm is fb.Adaptive learning factorYit in the ith scrounger at t is used to update the scrounger location, and it is defined as(9)Yit=11+e−k.The location of the scrounger is updated as follows:(10)di,jt+1=Yitdi,jt+FLdm,jt−di,jtrand0,1.In BSA, it may have a disadvantage of slow convergence speed and low accuracy. Accordingly, the proposed IBSA model is developed to resolve this drawback. First, the adaptation values of the bird swarm are sorted when the groups fly to their end-point. Second, the first five ranking individuals are set as producers, and the last four individuals are selected as scroungers. The rest of the birds are randomly selected as producers or scroungers. The producer location is updated as follows:(11)dr,jt+1=αtdr,jt+dr,jtrand0,1,1≤r≤5.The location updated for scrounger is shown as follows:(12)dr,jt+1=Yrtdr,jt+FLdm,jt−dr,jtrand0,1,M−4<r≤M,where dr,jtr∈1,M is the individual position of the swarm after sorting and Yrt represents the adaptive learning factor of the rth scrounger at t.


### 3.2. Principle of Extreme Learning Machine

Extreme learning machine (ELM) is based on the feedforward neural network, which is often used to solve the problems of unsupervised learning and supervised learning [50, 51]. The structure of ELM model includes the hidden layer, the output layer, and the input layer. Let S be samples, E be the input matrix, and C be the output matrix. e and c represent interior parameters of E and C, respectively. m×S denotes that E is a sample set matrix with m-row and S-column. n×S represents that C is an n-row and S-column matrix.(13)E=e11e12⋯e1Se21e22⋯e2S⋅⋅⋯⋅em1em2⋯emSm×S,C=c11c12⋯c1Sc21c22⋯c2S⋅⋅⋯⋅cn1cn2⋯cnSn×S,α=α11α12⋯α1mα21α22⋯α2m⋅⋅⋯⋅αl1αl2⋯αlml×m,where α is the connection weight that connects the input layer and the hidden layer and l×m indicates that α is a matrix with l rows and m columns.(14)β=β11β12⋯β1nβ21β22⋯β2n⋅⋅⋯⋅βl1βl2⋯βInl×n,where β is the connection weight that connects the input layer and the hidden layer and l×n indicates that β is a matrix with l rows and n columns.γ=γ1,γ2,…,γl1×lT is the threshold of hidden layer. α and γ will be optimized by IBSA.The activation function of the hidden layer is sigmoid functionfx as follows:(15)fx=11+e−x.C represents the output of the network as follows:(16)C=c1,c2,…,csn×S.The elementcj in C is expressed as follows:(17)cj=c1jc2j⋮cnjn×1=∑i=1lβi1Fαiej+γi∑i=1lβi2Fαiej+γi⋮∑i=1lβinFαiej+γin×1.Equation (17) can be simplified as follows:(18)CT=Qβ.In equation (18), CT is the transposition of C, the output of hidden layer is Q, and it is expressed as follows:(19)Q=Fα1⋅e1+γ1Fα2⋅e1+γ2⋯Fαl⋅e1+γlFα1⋅e2+γ1Fα2⋅e2+γ2⋯Fαl⋅e2+γl⋅⋅⋯⋅Fα1⋅eS+γ1Fα2⋅eS+γ2⋯Fαl⋅eS+γlS×l.Huang et al. proposed the following two theorems [50].Theorem 1.
GivenS different samples (im,cn), among them, em = [ei1, ei2, …, emS]T ∈ Rm, ci = [ci1,ci2,…cin]T ∈ Rn. Given an activation function F(·): R ⟶ R, which is infinitely differentiable in any interval. For ELM with S hidden layer neurons, if wi∈Rn and bi ∈ R are assigned arbitrarily, the output matrix Q of the hidden layer is reversible and Qβ−CT=0.From Theorem1, if the number of neurons in the hidden layer is equal to the number of samples in the training set, with any w and b, ELM can approach the training sample value with zero error.Theorem 2.
GivenS different samples (im, cn), Among them, em = [ei1, ei2, …, emS]T ∈ Rm, ci = [ci1, ci2, …, cin]T ∈ Rn. Given an activation function F(·): R ⟶ R and any small positive value ε>0. For ELM with K (K≤S) hidden layer neurons, if wi∈Rn and bi ∈ R are assigned arbitrarily, then Qβ−CT<ε.If the training set number of samplesS is large, the neurons number in the hidden layer K is usually smaller than S. It implies that the training error of the ELM can approach any small positive value ε>0.Thew and b can be randomly selected before training, and they remain unchanged during training. The connection weight β between the hidden layer and the input layer can be obtained by solving the least square solution as(20)minβQβ−CT.From equation (20), β^=Q+CT can be obtained, where Q+ is the Moore–Penrose generalized inverse of matrix Q.


### 3.3. Hybrid Improved Bird Swarm Algorithm with Extreme Learning Machine

During the ELM training process, the number of nodes in the hidden layer of the ELM may increase when the threshold of the hidden layer and the weight of the input layer are not appropriately adjusted. As a result, the prediction stability worsened. Consequently, the improved bird swarm optimization algorithm (IBSA) was involved to obtain optimal solutions for the hidden layer thresholdγ and input weight α in ELM.The process of PV power output prediction using IBSAELM model is shown in Figure1. The specific steps are illustrated as follows: (1) Determining the ratio of training samples and test samples. (2) Normalizing the training samples, i.e., converting the original data to a specific range of values. (3) Initializing the parameters of the BSA, such as population M, maximum number of iterations tmax, and migration frequency FQ. (4) Calculating the fitness value and further determining the local optimal individual and the global optimal individual. (5) Starting the iteration training process to optimize the threshold and the weights of the ELM model. At the end of the iteration, the optimal parameters of the ELM model would be obtained. (6) Inputting the optimal parameters to the ELM model. (7) Predicting the PV power using the trained IBSAELM model. (8) Performing out the antinormalization process to restore the normalized value to the original range, and evaluating the prediction effectiveness.Figure 1
The process of PV power output prediction using the IBSAELM model.


## 3.1. Bird Swarm Algorithm and Improved Bird Swarm Algorithm

The bird swarm algorithm (BSA) was originally inspired from the flight and foraging behavior of birds in nature. Its processing rules are shown as follows [46, 49]:(1)
Foraging behavior or vigilance behavior can be chosen by each bird.(2)
The best information within the group and the individual can be recorded by each bird and shared within the group.(3)
When the bird chooses the vigilance behavior, it will move to the center of the group, and there is competition during the process of movement.(4)
The birds periodically migrate to the next location. Then, the producer can be selected using the best fitness. In the meanwhile, the scrounger can be selected using the worst fitness, and other producers or scroungers are randomly selected from the remaining birds.(5)
Scroungers will follow producers to find food.Let there beM birds. The time step is denoted as t, and the location of the ith bird in the jth dimension is di,jt.The rule (2) can be expressed as(1)di,jt+1=di,jt+Rbi,j−di,jtrand0,1+Dzj−di,jtrand0,1,where rand0,1 is an independent uniformly distributed random variable on the interval [0, 1]; R is the cognitive coefficient; D is the accelerated coefficient; di,jt represents the position at t; bi,j is the best location of the ith bird; and zj is the best place.When birds keep vigilance, their location is updated as follows:(2)di,jt+1=di,jt+E1dmean,j−di,jtrand0,1+E2bm,j−di,jtrand−1,1,(3)E1=e1exp−fiMsumf+ε,(4)E2=e2expfi−fmfi−fm+εfmMsumf+ε,where dmean,j represents the average position of the whole swarm in jth dimension; rand−1,1 is an independent uniformly distributed random variable on the interval [−1, 1]; m is a randomly selected positive integer (m≠i) where m∈1,M≠i; bm,j represents the best previous position of the mth bird and fm is the optimal fitness value of the mth bird; e1 and e2 are the constants between 0,2; fi represents the optimal fitness value of the ith bird and sumf denotes the sum of the optimal fitness values in a bird swarm; and ε is an infinitesimal quantity.The location update equation for producers is as follows:(5)di,jt+1=di,jt+di,jtrand0,1.The location update equation for scroungers is as follows:(6)di,jt+1=di,jt+FLdm,jt−di,jtrand0,1.In equation (6), FL represents the following coefficient, where FL∈0,2. dm,jt denotes the position of the mth bird.The producer location is updated as follows:(7)di,jt+1=atdi,jt+di,jtrand0,1,at=amax−amincosttmaxπ+amin,where t denotes the current iteration number and tmax is the maximum iteration number; at represents the adaptive learning coefficient of the producer, which is the function of a cosine; and amax and amin are the maximum and minimum learning coefficients, respectively. In this study, amax is set as 0.9, and amin is set as = 0.4.The relative change rate of the scrounger’s fitness valuek is defined as(8)k=fi−fbfb.In equation (8), the best fitness value of the ith scrounger is fi and the best fitness value of the bird swarm is fb.Adaptive learning factorYit in the ith scrounger at t is used to update the scrounger location, and it is defined as(9)Yit=11+e−k.The location of the scrounger is updated as follows:(10)di,jt+1=Yitdi,jt+FLdm,jt−di,jtrand0,1.In BSA, it may have a disadvantage of slow convergence speed and low accuracy. Accordingly, the proposed IBSA model is developed to resolve this drawback. First, the adaptation values of the bird swarm are sorted when the groups fly to their end-point. Second, the first five ranking individuals are set as producers, and the last four individuals are selected as scroungers. The rest of the birds are randomly selected as producers or scroungers. The producer location is updated as follows:(11)dr,jt+1=αtdr,jt+dr,jtrand0,1,1≤r≤5.The location updated for scrounger is shown as follows:(12)dr,jt+1=Yrtdr,jt+FLdm,jt−dr,jtrand0,1,M−4<r≤M,where dr,jtr∈1,M is the individual position of the swarm after sorting and Yrt represents the adaptive learning factor of the rth scrounger at t.


## 3.2. Principle of Extreme Learning Machine

Extreme learning machine (ELM) is based on the feedforward neural network, which is often used to solve the problems of unsupervised learning and supervised learning [50, 51]. The structure of ELM model includes the hidden layer, the output layer, and the input layer. Let S be samples, E be the input matrix, and C be the output matrix. e and c represent interior parameters of E and C, respectively. m×S denotes that E is a sample set matrix with m-row and S-column. n×S represents that C is an n-row and S-column matrix.(13)E=e11e12⋯e1Se21e22⋯e2S⋅⋅⋯⋅em1em2⋯emSm×S,C=c11c12⋯c1Sc21c22⋯c2S⋅⋅⋯⋅cn1cn2⋯cnSn×S,α=α11α12⋯α1mα21α22⋯α2m⋅⋅⋯⋅αl1αl2⋯αlml×m,where α is the connection weight that connects the input layer and the hidden layer and l×m indicates that α is a matrix with l rows and m columns.(14)β=β11β12⋯β1nβ21β22⋯β2n⋅⋅⋯⋅βl1βl2⋯βInl×n,where β is the connection weight that connects the input layer and the hidden layer and l×n indicates that β is a matrix with l rows and n columns.γ=γ1,γ2,…,γl1×lT is the threshold of hidden layer. α and γ will be optimized by IBSA.The activation function of the hidden layer is sigmoid functionfx as follows:(15)fx=11+e−x.C represents the output of the network as follows:(16)C=c1,c2,…,csn×S.The elementcj in C is expressed as follows:(17)cj=c1jc2j⋮cnjn×1=∑i=1lβi1Fαiej+γi∑i=1lβi2Fαiej+γi⋮∑i=1lβinFαiej+γin×1.Equation (17) can be simplified as follows:(18)CT=Qβ.In equation (18), CT is the transposition of C, the output of hidden layer is Q, and it is expressed as follows:(19)Q=Fα1⋅e1+γ1Fα2⋅e1+γ2⋯Fαl⋅e1+γlFα1⋅e2+γ1Fα2⋅e2+γ2⋯Fαl⋅e2+γl⋅⋅⋯⋅Fα1⋅eS+γ1Fα2⋅eS+γ2⋯Fαl⋅eS+γlS×l.Huang et al. proposed the following two theorems [50].Theorem 1.
GivenS different samples (im,cn), among them, em = [ei1, ei2, …, emS]T ∈ Rm, ci = [ci1,ci2,…cin]T ∈ Rn. Given an activation function F(·): R ⟶ R, which is infinitely differentiable in any interval. For ELM with S hidden layer neurons, if wi∈Rn and bi ∈ R are assigned arbitrarily, the output matrix Q of the hidden layer is reversible and Qβ−CT=0.From Theorem1, if the number of neurons in the hidden layer is equal to the number of samples in the training set, with any w and b, ELM can approach the training sample value with zero error.Theorem 2.
GivenS different samples (im, cn), Among them, em = [ei1, ei2, …, emS]T ∈ Rm, ci = [ci1, ci2, …, cin]T ∈ Rn. Given an activation function F(·): R ⟶ R and any small positive value ε>0. For ELM with K (K≤S) hidden layer neurons, if wi∈Rn and bi ∈ R are assigned arbitrarily, then Qβ−CT<ε.If the training set number of samplesS is large, the neurons number in the hidden layer K is usually smaller than S. It implies that the training error of the ELM can approach any small positive value ε>0.Thew and b can be randomly selected before training, and they remain unchanged during training. The connection weight β between the hidden layer and the input layer can be obtained by solving the least square solution as(20)minβQβ−CT.From equation (20), β^=Q+CT can be obtained, where Q+ is the Moore–Penrose generalized inverse of matrix Q.


## 3.3. Hybrid Improved Bird Swarm Algorithm with Extreme Learning Machine

During the ELM training process, the number of nodes in the hidden layer of the ELM may increase when the threshold of the hidden layer and the weight of the input layer are not appropriately adjusted. As a result, the prediction stability worsened. Consequently, the improved bird swarm optimization algorithm (IBSA) was involved to obtain optimal solutions for the hidden layer thresholdγ and input weight α in ELM.The process of PV power output prediction using IBSAELM model is shown in Figure1. The specific steps are illustrated as follows: (1) Determining the ratio of training samples and test samples. (2) Normalizing the training samples, i.e., converting the original data to a specific range of values. (3) Initializing the parameters of the BSA, such as population M, maximum number of iterations tmax, and migration frequency FQ. (4) Calculating the fitness value and further determining the local optimal individual and the global optimal individual. (5) Starting the iteration training process to optimize the threshold and the weights of the ELM model. At the end of the iteration, the optimal parameters of the ELM model would be obtained. (6) Inputting the optimal parameters to the ELM model. (7) Predicting the PV power using the trained IBSAELM model. (8) Performing out the antinormalization process to restore the normalized value to the original range, and evaluating the prediction effectiveness.Figure 1
The process of PV power output prediction using the IBSAELM model.


## 4. Performance Results

### 4.1. Effect of Weather Conditions on PV Output Power

It is well known that depending upon the weather conditions, light intensity is the key factor in PV power output. The relationship between output power and light intensity in sunny weather and cloudy weather is shown in Figures2 and 3, respectively. The data were collected every 5 min, from 9:00 to 16:00 from the open-access provided by the Desert Knowledge Australia Solar Center. The data for the sunny weather were collected on August 8, 2017, while the data for cloudy weather were collected on October 7, 2017.Figure 2
PV output power and light intensity in sunny weather.Figure 3
PV output power and light intensity in cloudy weather.As shown in Figures2 and 3, irrespective of the weather conditions being sunny or cloudy, the PV power output generated is consistent with the light intensity, confirming a positive correlation. Additionally, the light intensity does not vary abruptly from time to time when the weather is sunny. However, the light intensity may fluctuate at any time in cloudy weather. Hence, it is obvious that the condition of the weather has a significant impact on the power output of the PV system.


### 4.2. Convergence Comparison Using Different Models

This section investigates the convergence effect in the IBSA, CSO, BSA, ACO, and PSO algorithms [42, 44, 45]. The basic parameters of IBSA are maximum iterations number tmax=500, the migration frequency of a flock of birds FQ=5, population quantity M=30, e1=1.5, and e2=1.5. The test function f1=∑i=1mxi2 is set in the range of −100,100 and the optimal value of the function is set as 0. The test function f2=∑i=1mxi+∏i=1mxi is set in the range of −10,10 and the optimal value of the function is set as 0. The test function f3=∑i=1mxi2−10×cos2πxi+10 is set in the range of −5.12,5.12 and the optimal value of the function is set as 0. Under the same standard functions as mentioned above, the CSO, PSO, BSA, and IBSA algorithms were tested 15 times with the test dimension = 50. The results are presented in Table 1. Note that the evaluation of all algorithms throughout this study was performed using the MATLAB software, the source code for which can be freely accessed at https://drive.google.com/drive/folders/1h2ZEvBInO7DdAWoaguV96S8KteIfkNw6?usp=sharing.Table 1
Convergence value and time of BSA, IBSA, PSO, ACO, and CSO algorithms.
FunctionAlgorithmOptimal convergence valueWorst convergence valueAverage convergence valueAverage timef1BSA1.06e − 2654.69e − 2311.56e − 2320.062500IBSA8.42e − 2972.11e − 2714.21e − 2730.046875PSO7.9431.6317.470.167969ACO1.6212e − 098.6225e − 093.9054e − 090.179541CSO4.17e − 116.34e − 052.61e − 060.124063f2BSA1.93e − 1336.71e − 1223.47e − 1230.093750IBSA1.94e − 1499.81e − 1335.21e − 1340.062500PSO17.3030.5423.510.145867ACO2.0573e − 054.16390.89520.197693CSO7.16e − 171.57e − 111.68e − 120.138750f3BSA0000.125000IBSA0000.109375PSO215.56361.31283.640.160078ACO8.954639.798218.63890.236877CSO6.85e − 111.36e − 24.52e − 040.133437In functionf1, the IBSA achieved the lowest average convergence value, while the PSO obtained has a value much higher than others. Similarly, in function f2, the IBSA algorithm exhibited the highest precision, while the PSO obtained relatively worse results than others. In function f3, both IBSA and BSA algorithms reached a zero-convergence value, i.e., the optimal solution, hence showing better performance than PSO, ACO, and CSO. In conclusion, IBSA exhibited the most favorable convergence effect in functions f1, f2, and f3. In addition, the convergence time of BSA and IBSA was significantly lesser than that of PSO, ACO, and CSO. The convergence time of IBSA was even shorter than that of BSA.The convergence curve of BSA and IBSA using the fitness value is shown in Figure4; this revealed that the convergence rate of IBSA is faster than that of BSA.Figure 4
The convergence curve of BSA and IBSA.


### 4.3. Evaluation of Model Performance

In this study, the sample data for the sunny days were collected from August 8, 2017, to August 12, 2017. The data for the cloudy days were collected from October 6, 2017, to October 10, 2017. The collection process took place every 5 min between 9:00 AM and 6:00 PM every day. Amongst all available data, the data from August 8, 2017, to August 11, 2017, and from October 6, 2017, to October 9, 2017, were chosen to be the training samples. The data from August 12, 2017, to October 10, 2017, were selected as the testing samples. The inputs for the forecast models were relative humidity, temperature, and light intensity, where the output of the forecast model was PV output power. The root mean squared error (RMSE) and the determination coefficient (R2) were used as evaluation indexes [52]:(21)RMSE=1m∑i=1mti∧−ti2,R2=m∑tt∧−∑t∑t∧2m∑t∧2−∑t∧2m∑t2−∑t2,where m, t∧, and t represent the samples number, the predicted value, and the actual value, respectively, and ti∧ and ti indicate the ith predicted value and actual value, respectively. The closer the determination coefficient (R2) is to 1, the better the performance the fitting effect achieves.In this study, five models were used to evaluate the effectiveness of PV output power prediction: (1) SVM model. (2) GPR model. (3) BSAELM model. (4) IBSAELM model. (5) BP model. The prediction results from models in sunny and cloudy weather are shown in Figures5 and 6, respectively.Figure 5
Prediction curves on August 12, 2017, in sunny weather.Figure 6
Prediction curves on October 10, 2017, in cloudy weather.As shown in Figure5, the prediction curves of the SVM, BP, GPR, BSAELM, and IBSAELM models are equipped with high fitting precision, due to stable sunlight strength, on sunny days. Subsequently, BSAELM and IBSAELM models exhibited relatively more desirable results.In Figure6, in the initial prediction period, the forecast fitting curves of the SVM and GPR models are inferior to others. In the mid-term period, the prediction curve of GPR deviates from the actual output power curve considerably. In the final period, the prediction curves of GPR, BP, and BSAELM models depart from the actual output power curve. On the other hand, the IBSAELM model exhibited a good fitting effect during the whole period.The absolute error (AE) is defined byΔx=x−xo, where x is the true value of a quantity, xo is the measured value, and Δx is the absolute error.The AE using BSAELM, IBSAELM, GPR, BP, and SVM models in sunny weather are shown in Figure7, where the unit is MW. As can be observed, the output power prediction errors from the five models fell within [−0.1, 0.2]. The highest error beyond 0.15 appeared in the early period while using GPR. However, most forecast errors are located between [−0.1, 0.1]. In the middle period, the prediction errors obtained using BSAELM and IBSAELM were smaller than those from GPR, BP, and SVM, which were located between [−0.05, 0.05]. In the last period, the prediction error from BSAELM reached the largest value, i.e., −0.1. Using IBSAELM resulted in the smallest error value during the whole prediction period and was located between [−0.05, 0.05].Figure 7
Prediction AE in sunny weather.The prediction AE in cloudy weather is shown in Figure8. In the initial prediction period, the errors from using GPR and SVM models were larger than others. It can be observed that the largest prediction error of the SVM model exceeded 0.2 and that of the GPR model was over 0.6. In the middle prediction period, the errors obtained from the BP, SVM, BSAELM, and IBSAELM were relatively small, remaining between [−0.2, 0.2]. In the last prediction period, the errors using BSAELM and IBSAELM remained relatively small. It was discovered that the error of IBSAELM lied between [−0.2, 0.2], which is the smallest value among the five prediction models, hence proving its suitability to provide showing the most desirable prediction effect.Figure 8
Prediction AE in cloudy weather.As a result, it is concluded that the prediction errors in cloudy weather are relatively higher than those in sunny weather. Moreover, the IBSAELM model achieves the lowest prediction error as compared to the other four models.The evaluation results usingRMSE and R2 are summarized in Table 2.Table 2
Evaluation results of model prediction.
WeatherModelRMSER2 (%)SunnySVM4.9699.81GPR8.0399.17BP4.3299.72BSAELM3.6499.31IBSAELM2.8399.59CloudySVM10.6398.42GPR47.2083.48BP9.3698.78BSAELM8.5898.83IBSAELM6.4399.35As presented in Table2, the prediction result obtained during the sunny days is considerably better than that obtained during cloudy days, for every model using RMSE. For example, the RMSE value of IBSAELM is 2.83 on sunny days and 6.43 on cloudy days. The RMSE values of BP, SVM, GPR, and BSAELM were 4.32, 4.96, 8.03, and 3.64, respectively, on sunny days. However, its respective RMSE values on cloudy days were 9.36, 10.63, 47.20, and 8.58, respectively. Hence, it can be observed that the RMSE of IBSAELM presents the best performance. In contrast, the R2 of every model reached above 99% on sunny days; however, the R2 in cloudy weather for each model was relatively lower than that of sunny days. Among all models, only IBSAELM achieved 99% plus on both sunny and cloudy days.


## 4.1. Effect of Weather Conditions on PV Output Power

It is well known that depending upon the weather conditions, light intensity is the key factor in PV power output. The relationship between output power and light intensity in sunny weather and cloudy weather is shown in Figures2 and 3, respectively. The data were collected every 5 min, from 9:00 to 16:00 from the open-access provided by the Desert Knowledge Australia Solar Center. The data for the sunny weather were collected on August 8, 2017, while the data for cloudy weather were collected on October 7, 2017.Figure 2
PV output power and light intensity in sunny weather.Figure 3
PV output power and light intensity in cloudy weather.As shown in Figures2 and 3, irrespective of the weather conditions being sunny or cloudy, the PV power output generated is consistent with the light intensity, confirming a positive correlation. Additionally, the light intensity does not vary abruptly from time to time when the weather is sunny. However, the light intensity may fluctuate at any time in cloudy weather. Hence, it is obvious that the condition of the weather has a significant impact on the power output of the PV system.


## 4.2. Convergence Comparison Using Different Models

This section investigates the convergence effect in the IBSA, CSO, BSA, ACO, and PSO algorithms [42, 44, 45]. The basic parameters of IBSA are maximum iterations number tmax=500, the migration frequency of a flock of birds FQ=5, population quantity M=30, e1=1.5, and e2=1.5. The test function f1=∑i=1mxi2 is set in the range of −100,100 and the optimal value of the function is set as 0. The test function f2=∑i=1mxi+∏i=1mxi is set in the range of −10,10 and the optimal value of the function is set as 0. The test function f3=∑i=1mxi2−10×cos2πxi+10 is set in the range of −5.12,5.12 and the optimal value of the function is set as 0. Under the same standard functions as mentioned above, the CSO, PSO, BSA, and IBSA algorithms were tested 15 times with the test dimension = 50. The results are presented in Table 1. Note that the evaluation of all algorithms throughout this study was performed using the MATLAB software, the source code for which can be freely accessed at https://drive.google.com/drive/folders/1h2ZEvBInO7DdAWoaguV96S8KteIfkNw6?usp=sharing.Table 1
Convergence value and time of BSA, IBSA, PSO, ACO, and CSO algorithms.
FunctionAlgorithmOptimal convergence valueWorst convergence valueAverage convergence valueAverage timef1BSA1.06e − 2654.69e − 2311.56e − 2320.062500IBSA8.42e − 2972.11e − 2714.21e − 2730.046875PSO7.9431.6317.470.167969ACO1.6212e − 098.6225e − 093.9054e − 090.179541CSO4.17e − 116.34e − 052.61e − 060.124063f2BSA1.93e − 1336.71e − 1223.47e − 1230.093750IBSA1.94e − 1499.81e − 1335.21e − 1340.062500PSO17.3030.5423.510.145867ACO2.0573e − 054.16390.89520.197693CSO7.16e − 171.57e − 111.68e − 120.138750f3BSA0000.125000IBSA0000.109375PSO215.56361.31283.640.160078ACO8.954639.798218.63890.236877CSO6.85e − 111.36e − 24.52e − 040.133437In functionf1, the IBSA achieved the lowest average convergence value, while the PSO obtained has a value much higher than others. Similarly, in function f2, the IBSA algorithm exhibited the highest precision, while the PSO obtained relatively worse results than others. In function f3, both IBSA and BSA algorithms reached a zero-convergence value, i.e., the optimal solution, hence showing better performance than PSO, ACO, and CSO. In conclusion, IBSA exhibited the most favorable convergence effect in functions f1, f2, and f3. In addition, the convergence time of BSA and IBSA was significantly lesser than that of PSO, ACO, and CSO. The convergence time of IBSA was even shorter than that of BSA.The convergence curve of BSA and IBSA using the fitness value is shown in Figure4; this revealed that the convergence rate of IBSA is faster than that of BSA.Figure 4
The convergence curve of BSA and IBSA.


## 4.3. Evaluation of Model Performance

In this study, the sample data for the sunny days were collected from August 8, 2017, to August 12, 2017. The data for the cloudy days were collected from October 6, 2017, to October 10, 2017. The collection process took place every 5 min between 9:00 AM and 6:00 PM every day. Amongst all available data, the data from August 8, 2017, to August 11, 2017, and from October 6, 2017, to October 9, 2017, were chosen to be the training samples. The data from August 12, 2017, to October 10, 2017, were selected as the testing samples. The inputs for the forecast models were relative humidity, temperature, and light intensity, where the output of the forecast model was PV output power. The root mean squared error (RMSE) and the determination coefficient (R2) were used as evaluation indexes [52]:(21)RMSE=1m∑i=1mti∧−ti2,R2=m∑tt∧−∑t∑t∧2m∑t∧2−∑t∧2m∑t2−∑t2,where m, t∧, and t represent the samples number, the predicted value, and the actual value, respectively, and ti∧ and ti indicate the ith predicted value and actual value, respectively. The closer the determination coefficient (R2) is to 1, the better the performance the fitting effect achieves.In this study, five models were used to evaluate the effectiveness of PV output power prediction: (1) SVM model. (2) GPR model. (3) BSAELM model. (4) IBSAELM model. (5) BP model. The prediction results from models in sunny and cloudy weather are shown in Figures5 and 6, respectively.Figure 5
Prediction curves on August 12, 2017, in sunny weather.Figure 6
Prediction curves on October 10, 2017, in cloudy weather.As shown in Figure5, the prediction curves of the SVM, BP, GPR, BSAELM, and IBSAELM models are equipped with high fitting precision, due to stable sunlight strength, on sunny days. Subsequently, BSAELM and IBSAELM models exhibited relatively more desirable results.In Figure6, in the initial prediction period, the forecast fitting curves of the SVM and GPR models are inferior to others. In the mid-term period, the prediction curve of GPR deviates from the actual output power curve considerably. In the final period, the prediction curves of GPR, BP, and BSAELM models depart from the actual output power curve. On the other hand, the IBSAELM model exhibited a good fitting effect during the whole period.The absolute error (AE) is defined byΔx=x−xo, where x is the true value of a quantity, xo is the measured value, and Δx is the absolute error.The AE using BSAELM, IBSAELM, GPR, BP, and SVM models in sunny weather are shown in Figure7, where the unit is MW. As can be observed, the output power prediction errors from the five models fell within [−0.1, 0.2]. The highest error beyond 0.15 appeared in the early period while using GPR. However, most forecast errors are located between [−0.1, 0.1]. In the middle period, the prediction errors obtained using BSAELM and IBSAELM were smaller than those from GPR, BP, and SVM, which were located between [−0.05, 0.05]. In the last period, the prediction error from BSAELM reached the largest value, i.e., −0.1. Using IBSAELM resulted in the smallest error value during the whole prediction period and was located between [−0.05, 0.05].Figure 7
Prediction AE in sunny weather.The prediction AE in cloudy weather is shown in Figure8. In the initial prediction period, the errors from using GPR and SVM models were larger than others. It can be observed that the largest prediction error of the SVM model exceeded 0.2 and that of the GPR model was over 0.6. In the middle prediction period, the errors obtained from the BP, SVM, BSAELM, and IBSAELM were relatively small, remaining between [−0.2, 0.2]. In the last prediction period, the errors using BSAELM and IBSAELM remained relatively small. It was discovered that the error of IBSAELM lied between [−0.2, 0.2], which is the smallest value among the five prediction models, hence proving its suitability to provide showing the most desirable prediction effect.Figure 8
Prediction AE in cloudy weather.As a result, it is concluded that the prediction errors in cloudy weather are relatively higher than those in sunny weather. Moreover, the IBSAELM model achieves the lowest prediction error as compared to the other four models.The evaluation results usingRMSE and R2 are summarized in Table 2.Table 2
Evaluation results of model prediction.
WeatherModelRMSER2 (%)SunnySVM4.9699.81GPR8.0399.17BP4.3299.72BSAELM3.6499.31IBSAELM2.8399.59CloudySVM10.6398.42GPR47.2083.48BP9.3698.78BSAELM8.5898.83IBSAELM6.4399.35As presented in Table2, the prediction result obtained during the sunny days is considerably better than that obtained during cloudy days, for every model using RMSE. For example, the RMSE value of IBSAELM is 2.83 on sunny days and 6.43 on cloudy days. The RMSE values of BP, SVM, GPR, and BSAELM were 4.32, 4.96, 8.03, and 3.64, respectively, on sunny days. However, its respective RMSE values on cloudy days were 9.36, 10.63, 47.20, and 8.58, respectively. Hence, it can be observed that the RMSE of IBSAELM presents the best performance. In contrast, the R2 of every model reached above 99% on sunny days; however, the R2 in cloudy weather for each model was relatively lower than that of sunny days. Among all models, only IBSAELM achieved 99% plus on both sunny and cloudy days.


## 5. Conclusions

In this study, the superiority of PV power prediction using the IBSAELM model, under two kinds of weather conditions against four existing models, was verified. TheR2 values obtained from the IBSAELM model remained over 99% and the RMSE values were 2.83 and 6.43 for sunny and cloudy weather, respectively; this indicates that the errors obtained using the IBSAELM model are lower than other models. However, the prediction error obtained in cloudy weather was relatively higher than the error obtained in sunny weather, in all models. The major contributions of this study are concluded as follows:(1)
The IBSA algorithm has effectively enhanced the searching ability of the BSA algorithm, by introducing adaptive learning coefficient and factors into the BSA algorithm.(2)
The IBSA algorithm efficiently optimizes the ELM model, which improves the prediction ability of the ELM. The IBSAELM model was thus constructed by integrating IBSA and ELM models to accurately predict the PV power.(3)
As compared to the SVM, BP, GPR, BSAELM, and IBSAELM models achieve the lowestRMSE value, indicating the best prediction accuracy. Similarly, the R2 value of IBSAELM in both sunny and cloudy weather reaches over 99%, i.e., higher than that of the other models.



---

*Source: 6638436-2021-08-27.xml*