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

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.


Introduction
e ecological environment on earth is significantly threatened due to the large consumption of fossil energy [1]. erefore, renewable energy resources have been exploited and widely applied to reduce nonrenewable energy consumption globally [2][3][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. e 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 ultrashort, short, medium, and long periods [9]. e ultra-short power forecast generally takes 0-4 hours, while the short power forecast takes 1-3 days. e 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][11][12].
At present, the primary method employed for ultrashort-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. e main contributions of this study are as follows: (1) e 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) e power generation scheduling could be arranged more reasonably and the safety in the electrified wire netting was therefore ensured.

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]. e 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). e 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. e 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. e 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. e generalized entropy criterion was then used to improve the prediction efficiency. e 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. e 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. e 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. e results revealed that the optimized BP neural network has a 2 Computational Intelligence and Neuroscience desirable prediction performance. e 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.

Bird Swarm Algorithm and Improved Bird Swarm
Algorithm. e 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) e 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) e birds periodically migrate to the next location. en, 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 be M birds. e time step is denoted as t, and the location of the i th bird in the j th dimension is d t i,j . e rule (2) can be expressed as where rand(0, 1) is an independent uniformly distributed random variable on the interval [0, 1]; R is the cognitive coefficient; D is the accelerated coefficient; d t i,j represents the position at t; b i,j is the best location of the i th bird; and z j is the best place.
When birds keep vigilance, their location is updated as follows: where d mean,j represents the average position of the whole swarm in j th 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; b m,j represents the best previous position of the m th bird and f m is the optimal fitness value of the m th bird; e 1 and e 2 are the constants between [0, 2]; f i represents the optimal fitness value of the i th bird and sumf denotes the sum of the optimal fitness values in a bird swarm; and ε is an infinitesimal quantity. e location update equation for producers is as follows: e location update equation for scroungers is as follows: In equation (6), FL represents the following coefficient, where FL ∈ [0, 2]. d t m,j denotes the position of the m th bird. e producer location is updated as follows: where t denotes the current iteration number and t max is the maximum iteration number; a(t) represents the adaptive learning coefficient of the producer, which is the function of a cosine; and a max and a min are the maximum and minimum learning coefficients, respectively. In this study, a max is set as 0.9, and a min is set as � 0.4. e relative change rate of the scrounger's fitness value k is defined as In equation (8), the best fitness value of the i th scrounger is f i and the best fitness value of the bird swarm is f b .
Adaptive learning factor Y t i in the i th scrounger at t is used to update the scrounger location, and it is defined as e location of the scrounger is updated as follows: 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. e rest of the birds are randomly selected as producers or scroungers. e producer location is updated as follows: Computational Intelligence and Neuroscience e location updated for scrounger is shown as follows: is the individual position of the swarm after sorting and Y t r represents the adaptive learning factor of the r th scrounger at t.

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]. e 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.
E � e 11 e 12 · · · e 1S e 21 e 22 · · · e 2S · · · · · · e m1 e m2 · · · e mS 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.
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. c � [c 1 , c 2 , . . . , c l ] T 1×l is the threshold of hidden layer. α and c will be optimized by IBSA. e activation function of the hidden layer is sigmoid function f(x) as follows: C represents the output of the network as follows: e element c j in C is expressed as follows: Equation (17) can be simplified as follows: In equation (18), C T is the transposition of C, the output of hidden layer is Q, and it is expressed as follows: Huang et al. proposed the following two theorems [50]. If the training set number of samples S 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. e w and b can be randomly selected before training, and they remain unchanged during training. e connection weight β between the hidden layer and the input layer can be obtained by solving the least square solution as 4 Computational Intelligence and Neuroscience From equation (20), β � Q + C T can be obtained, where Q + is the Moore-Penrose generalized inverse of matrix Q.

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 c and input weight α in ELM. e process of PV power output prediction using IBSAELM model is shown in Figure 1 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.

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. e relationship between output power and light intensity in sunny weather and cloudy weather is shown in Figures 2 and 3, respectively. e data were collected every 5 min, from 9:00 to 16:00 from the open-access provided by the Desert Knowledge Australia Solar Center.
e data for the sunny weather were collected on August 8, 2017, while the data for cloudy weather were collected on October 7, 2017.
As shown in Figures 2 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.

Convergence Comparison Using Different Models.
is section investigates the convergence effect in the IBSA, CSO, BSA, ACO, and PSO algorithms [42,44,45]. e basic parameters of IBSA are maximum iterations number t max � 500, the migration frequency of a flock of birds FQ � 5, population quantity M � 30, e 1 � 1.5, and e 2 � 1.5. e test function f 1 � m i�1 x 2 i is set in the range of [−100, 100] and the optimal value of the function is set as 0. e test function f 2 � m i�1 |x i | + m i�1 |x i | is set in the range of [−10, 10] and the optimal value of the function is set as 0. e test function f 3 � m i�1 (x 2 i − 10 × cos(2πx i ) + 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. e 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�shari ng.
In function f 1 , the IBSA achieved the lowest average convergence value, while the PSO obtained has a value much higher than others. Similarly, in function f 2 , the IBSA algorithm exhibited the highest precision, while the PSO obtained relatively worse results than others. In function f 3 , 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 f 1 , f 2 , and f 3 . In addition, the convergence time of BSA and IBSA was significantly lesser than that of PSO, ACO, and CSO. e convergence time of IBSA was even shorter than that of BSA. e convergence curve of BSA and IBSA using the fitness value is shown in Figure 4; this revealed that the convergence rate of IBSA is faster than that of BSA.

Evaluation of Model Performance.
In this study, the sample data for the sunny days were collected from August 8, 2017, to August 12, 2017. e data for the cloudy days were collected from October 6, 2017, to October 10, 2017. e 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. e data from August 12, 2017, to October 10, 2017, were selected as the testing samples. e inputs for the forecast models were relative humidity, temperature, and light intensity, where the output of the forecast model was PV output power. e root mean squared error (RMSE) and the determination coefficient (R 2 ) were used as evaluation indexes [52]: where m, t ∧ , and t represent the samples number, the predicted value, and the actual value, respectively, and t ∧ i and t i indicate Computational Intelligence and Neuroscience the i th predicted value and actual value, respectively. e closer the determination coefficient (R 2 ) 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.  Figures 5 and 6, respectively.
As shown in Figure 5, 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 Figure 6, 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. e absolute error (AE) is defined by Δx � x − x o , where x is the true value of a quantity, x o is the measured value, and Δx is the absolute error. e AE using BSAELM, IBSAELM, GPR, BP, and SVM models in sunny weather are shown in Figure 7, where the  Figure 1: e process of PV power output prediction using the IBSAELM model.   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    Figure 8. 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.
As a result, it is concluded that the prediction errors in cloudy weather are relatively higher than those in   Table 2.
As presented in Table 2, 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. e 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 R 2 of every model reached above 99% on sunny days; however, the R 2 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. Computational Intelligence and Neuroscience

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. e R 2 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. e major contributions of this study are concluded as follows: (1) e IBSA algorithm has effectively enhanced the searching ability of the BSA algorithm, by introducing adaptive learning coefficient and factors into the BSA algorithm. (2) e IBSA algorithm efficiently optimizes the ELM model, which improves the prediction ability of the ELM. e 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 lowest RMSE value, indicating the best prediction accuracy. Similarly, the R 2 value of IBSAELM in both sunny and cloudy weather reaches over 99%, i.e., higher than that of the other models.
Data Availability e data that support the findings of this study are openly available from the Desert Knowledge Australia Solar Center at http://dkasolarcentre.com.au/.

Conflicts of Interest
e authors declare no conflicts of interest.