Solar radiation forecasting in Nigeria based on hybrid PSO-ANFIS and WT-ANFIS approach

Received Sep 30, 2018 Revised Apr 2, 2019 Accepted Apr 15, 2019 For an effective and reliable solar energy production, there is need for precise solar radiation knowledge. In this study, two hybrid approaches are investigated for horizontal solar radiation prediction in Nigeria. These approaches combine an Adaptive Neuro-fuzzy Inference System (ANFIS) with Particle Swarm Optimization (PSO) and Wavelet Transform (WT) algorithms. Meteorological data comprising of monthly mean sunshine hours (SH), relative humidity (RH), minimum temperature (Tmin) and maximum temperature (Tmax) ranging from 2002-2012 were utilized for the forecasting. Based on the statistical evaluators used for performance evaluation which are the root mean square error and the coefficient of determination (RMSE and R2), the two models were found to be very worthy models for solar radiation forecasting. The statistical indicators show that the hybrid WT-ANFIS model’s accuracy outperforms the PSO-ANFIS model by 65% RMSE and 9% R2. The results also show that hybridizing the ANFIS by PSO and WT algorithms is efficient for solar radiation forecasting even though the hybrid WT-ANFIS gives more accurate results.


INTRODUCTION
Recently, the renewable energy sector is the fastest growing sector worldwide for energy generation. This is as a result of the intention to reduce total dependence on fossil fuels that results in greenhouse gas emission. It is also evident that out of these renewable energy sources harnessed for electricity production, the most widely used source of energy is solar energy [1,2]. It is the most attractive source of energy because it is readily available almost everywhere in abundant quantity. It is a clean and environmentally friendly source of energy that is inexhaustible in nature. With the current utilization of solar energy across the globe, there still exists the problem of solar radiation data availability that serves as a barrier to an effective solar power project in places where these data are not available [3]. Countries in Sub-Saharan Africa including Nigeria do not have the state of the art equipment for efficient meteorological data measurement such as solar radiation due to the high cost of equipment and its maintenance cost. It is impossible to have an efficient solar power design without the knowledge of solar radiation data. Therefore, for an effective solar power design, there is a need for accurate solar radiation data prediction. For this reason, enormous models have been developed to predict the solar radiation data in different parts of the world where such data is unavailable. Empirical models, as well as artificial intelligence models, have been developed for this purpose. These models were developed using the available meteorological data available in those areas and have a 3917 correlation with solar radiation e.g sunshine hours, minimum temperature, maximum temperature, average temperature, cloud cover, longitude, latitude [4,5]. Empirical modes have been employed by many scholars [6][7][8][9][10] for solar radiation forecasting by utilizing various accessible meteorological data especially sunshine hours. For better accuracy, artificial intelligence (AI) method has been recently adopted and utilized by many scholars for solar radiation prediction [11][12][13][14][15][16][17]. Some scholars developed hybrid models by combining two or more AI methods. This is done to obtain a more accurate prediction. Researchers like Wu et al [18] developed a hybrid model for solar radiation prediction by combining Autoregressive Moving Average Model (ARMA) and Time Division Neural Network (TDNN) which he found out that the combination of the two methods outperforms the individual ARMA and TDNN separately. Mustafi [19] also developed a hybrid model by combining Simulated Annealing (SA) and genetic programming, the developed model produced a very accurate for solar radiation prediction. Mohammadi et al [20] proposed a hybrid Support Vector Machine-Firefly Algorithm (SVM-FFA) model and a hybrid SVM-WT model for solar radiation prediction. The two models developed turned out to give accurate estimation and when compared, the SVM-WT outperforms the SVM-FFA in terms of accuracy. Olatomiwa et al [14] developed a hybrid SVM-FFA model for solar radiation prediction in Nigeria and compared with Artificial Neural Network (ANN) and Genetic Programming (GP) models. The SVM-FFA model accuracy outperforms the ANN and GA models.
In this study, the efficiency of two hybrid methods namely Particle Swarm Optimization and Adaptive Neuro-fuzzy Inference System (PSO-ANFIS) and Wavelet Transform and Adaptive Neuro-fuzzy Inference System (WT-ANFIS) were examined for solar radiation forecasting in Nigeria. The models were developed by combining Adaptive Neuro-fuzzy Inference System (ANFIS) with Particle Swarm Optimization (PSO) and Wavelet Transform (WT) algorithms to forecast the horizontal solar radiation. ANFIS is a robust hybrid intelligent system that incorporates the learning rule of the neural network and the exhibition of fuzzy logic. PSO and WT are used to optimize the ANFIS in order to increase its forecasting accuracy. WT is a signal processing tool used in decomposing and reconstructing signals or data into different frequency components [21]. PSO is a swarm intelligence optimization algorithm inspired as a result of the behavior of birds and fishes which is based on their social interactions [21]. The objective of this study is to investigate the forecasting ability of the two hybrid models (WT-ANFIS and PSO-ANFIS) for solar radiation forecasting and recognize which of the two models has a better optimizing ability for the prediction. Several studies have been carried out for solar radiation forecasting but none has applied WT-ANFIS approach. The forecasting is done using the meteorological data available at the case study which includes sunshine hours, relative humidity, minimum temperature, and maximum temperature. Which are considered as inputs to the developed hybrid models.

Data collection
Meteorological data for 10 years period ranging from 2002-2012 were collected from the Nigerian Meteorological Agency (NIMET) and are used to carry out this study. Monthly average solar radiation data were used as the output. Other meteorological data used as the input includes the monthly average sunshine hours (SH), relative humidity (RH), minimum temperature (Tmin) and maximum temperature (Tmax). The meteorological data collected were for Kano state Nigeria with longitude 12.0022ºN and latitude 8.952ºE, the monthly average of the meteorological data used are presented in Figure 1. The data obtained were divided into two (training data and testing data), the training data sets range from 2002-2009 (70%) and the testing data set ranges from 2010-2012 (30%).

Adaptive neuro-fuzzy inference system (ANFIS)
ANFIS was first developed in the year 1993 by J.S Roger through the combination of neural network and fuzzy reasoning [22]. The ANFIS provides a basic set of Sugeno-type "ÍF….THEN" fuzzy inference system with a neural network as the fuzzy rule engine. The ANFIS is a network structure that is regarded as more effective than the individual fuzzy systems or neural network. It delivers a more optimum result than any of the two systems [23]. An ANFIS structure with inputs and and ouput is presented in Figure 1. The ANFIS structure consist of 5 layers with each of the layers having dissimilar functions. In this study, the ANFIS used has four inputs and one output, with the five layers comprising of nodes in each of the layers, and the nodes on these layers carry out the same function.
If is A 1 and is B 1 , then, If is A 2 and is B 2 , then, where, , and are preceding parameters. Layer 1: It comprises of an input membership functions which supplies the inputs to layer two. The nodes in layer 1 comprise of node functions referred to as adaptive nodes. Outputs of these nodes are presented in (3) and (4) respectively. or ( ) and ( ) represents the membership functions of node A, x or y is the input of node i, and or is a connected linguistic label.
is the membership rating of fuzzy sets A and B. In (5) presents the global function of the non-linear constraints (5) [24] and [13].
where are the sets of parameters. The function varies as the parameters change, thereby exhibiting diverse forms of membership functions type for fuzzy set A.
Layer 2: The incoming signals from the first layer are multiplied in this layer and the obtained results are sent out as the output. The output is considered as an AND or OR procedure of the membership function which comes from the preceding layer [25]. It is presented in (6). (6) where indicates the membership function of node A and is the membership function of node B Layer 3: this is a non-adaptive layer which is also called the normalization layer. The third layer usually set the rules [26]. It is the ratio of node i firing strength to the sum of all rules firing strengths ̅ Indicates the firing strength Layer 4: layer four consists of nodes that are all adaptive nodes with each of the nodes computing the ith contribution to the output. It is the product of the signal controlled by the previous node which gives node i [26,27].
̅̅̅ is the normalized firing strength from the previous layer, while are the preceding parameters.
Layer 5: This being the last layer comprises of a single node which computes the outputs. The output is the summation of all the incoming signals coming from the previous layer [22,25].
∑ ̅̅̅ (9) where is the summation of the incoming signals

Particle swarm optimization
Particle Swarm Optimization (PSO) is a swarm intelligence optimization algorithm developed by Eberhart and Kennedy in the year 1995 [28]. The algorithm is inspired as a result of the behavior of birds and fishes which is based on their social interactions [21]. As these birds and fishes go randomly in search for food, each of these birds or fish serve as a single solution, these solutions can be explained as particles in a swarm. In PSO, each of these particles goes in search of a possible solution to a given problem. The movement of these particles is characterized by where they fit best and their current locations with the numbers of the swarm [29].
PSO is regarded as a population-based exploration method with each impending solution (a swarm) represents a particle of a population. The particles continue to change their positions during their random search until they attain an optimal state. PSO as an optimization algorithm has been utilized to solve numerous optimization problems and has proved its effectiveness and efficiency as a useful tool for solving optimization problems [30]. The effectiveness of PSO was shown in previous empirical studies [31].
In PSO, each particle is associated with its best solution (pbest) of its coordinate in the problem space. Then followed by another best value (ibest) which is obtained by any particle next to the particle. When a particle takes all the population as the topological neighbors, the best value is called (gbest) which is the global best value. The velocity vector is updating according to the position of gbest and pbest. In (10) and (11) illustrates how the particle position and velocity are updated. The velocity vector is updating according to the position of and .
where ( ) is the agent velocity at iteration, is the inertia weight, w is the weighing factor of inertia, are random variables and with ( ), and and are positive acceleration constants. Figure 2 demonstrate the PSO search mechanism using velocity update rule (10) and position update (11).

Wavelet transform
Wavelet transform (WT) is a signal processing tool similar to Fourier Transform used to decompose time series signal into different frequency components. WT has been widely used in both scientific and engineering applications [32,33], particularly in the areas of signal and data analysis. Time series data are decomposed into detailed and approximate components using WT in order to reduce the differences between the series data [17,34]. The decomposed data results are further reconstructed to perform further analysis using inverse-WT which is done after successful segregation. The processing is in two levels and depends on the choice of the mother wavelet as presented in Figure 3, this also depends on the application. Figure 4 presents the decomposition and reconstruction process. In (12) shows a decomposed signal S, using (13).
where A n (t) is the estimated component while D n (t), D n-1 (t), D n-2 (t), etc, are actual components.
where is the mother wavelet, is scale factor and is the time-shift parameter. The reconstruction of the data is conducted using (14) with the all parameters maintaining their original definition.

MODEL DEVELOPMENT
The procedures used in developing the two hybrid models are shown in Figures 5 and 6. The hybrid approach in this study is the combination of ANFIS and PSO and ANFIS and WT. The prediction is performed using ANFIS while the PSO and WT are used in improving the performance of the ANFIS model.

WT-ANFIS development
WT is applied to the time series data used for the ANFIS prediction. The original data obtained is first decomposed into two levels of wavelet coefficients using Db2. There are different mother wavelets available for signal or data analysis, in this work Db2 mother wavelet is selected due to its orthogonal features which makes it not to lose any information from the decomposed coefficients while reconstructed into original signals. After the decomposition, the process of reconstruction of the signals is then carried out as illustrated in Figure 5. The output from the developed WT-ANFIS model presents the predicted solar radiation at the end of the simulation process. In the beginning, the data is first arranged in a matrix form and presented on an excel sheet, for this study comprising of four inputs and one output, the first four columns on the excel sheet represent the inputs while the fifth column represents the output data. The input data columns are regarded as the real inputs. WT is first used to decompose the data using the two-level mother wavelet Db2 before the prediction starts. As mentioned earlier, the Db2 is chosen because it is widely agreed that it is capable of providing a worthy estimation of the signals. Two approximate and detailed coefficients are chosen from the decomposed signals because they give more information on about the data used. For this reason, each of the two coefficient signals will be trained using a different ANFIS network. The wanted signals are then forwarded to the ANFIS structure and the ANFIS is then trained using the WT data, by adjusting the ANFIS parameters during the training phase in order to satisfy the submitted outputs. This same process is repeated in the testing stage using the unused data from the training stage. The outputs from the ANFIS will be extracted and the WT will then be used for the reconstruction of those outputs, the reconstructed outputs from the WT provide the final solar radiation prediction output by WT-ANFIS approach. The error margin between the target output and the predicted output is then computed using the statistical indicators. RMSE and R² are used for performance evaluation of the developed WT-ANFIS.  Figure 6. PSO-ANFIS model flowchart

PSO-ANFIS development
The data set used for this study are first presented in a matrix form on an excel sheet similar to that of the WT, these data set are presented in columns with 4 columns as inputs and 1 column as output. The number of columns of the input data represents the real inputs. The ANFIS is then trained using the data set presented. This training is done using the default training algorithm in ANFIS which are the least square estimation (LSE) in the forward pass and Gradient Descent (GD) in the backward pass. The LSE is used to determine the consequent parameters ( ) in the forward pass, and the GD is used to update the membership function parameters in the backward pass. The system parameters are adjusted as inputs/outputs during the training process. The same applies to the testing process for the data that has not been used during the training process. To obtain more accurate results, PSO is used to train the parameters of the ANFIS membership functions. This is done by creating an N-dimension vector where N denotes the number of membership functions. The PSO algorithm optimizes the membership function parameters contained in the vector. The PSO algorithm parameters are then defined and initialized randomly during the first stage. The PSO algorithm then keeps updating these parameters by updating one parameter of the membership function during each iteration. This update continues from iteration to iteration until we obtain the best possible solution by obtaining a minimum error set. The output of the ANFIS is then extracted using the parameters obtained by the PSO, and this output gives the forecasted output of the proposed hybrid PSO-ANFIS model.

Model performance assessment
The hybrid PSO-ANFIS and WT-ANFIS models performance are analyzed using the following statistical indicators Root mean square error (RMSE) The coefficient of determination ( ) where are the predicted and target values, while ̅ ̅ represents the mean values of Also, n denotes the entire test data amount. Lower values of RMSE and MAPE signifies good performance while higher values of signifies good model performance while

RESULTS AND DISCUSSIONS
In this study, the efficiency of two hybrid methods namely PSO-ANFIS and WT-ANFIS were examined for solar radiation forecasting in Nigeria. The two models were developed separately, one is by optimizing the ANFIS with PSO and the other is by decomposing the model inputs using WT. The accuracy of the two hybrid models was assessed using RMSE and R². From the obtained values of the RMSE and R², it was clear that the two hybrid models were both viable for solar radiation forecasting. The obtained results are shown in Figures 7 and 8. Figure 7 presents the scatter plots of the developed hybrid models, from Figures 7 (a) and (b) which is the scatter plot for the PSO-ANFIS, it is clear that there's a very good convergence between the predicted solar radiation and the target solar radiation both at the training and testing phase. Figures 7 (c) and (d) also presents the scatter plot of the WT-ANFIS model, which also shows a clear relationship between the target and the forecasted output at both the training phase and the testing phase. Although the two models show a very good correlation between the forecasted output and target output, the WT-ANFIS shows more convergence when compared with PSO-ANFIS model, thereby providing more accuracy. Figure 8 also presents the comparison of the two hybrid PSO-ANFIS and WT-ANFIS models between the target and the forecasted output. The two hybrid models indicate a very good accuracy for the forecasting by providing a good correlation between the measured output and the forecasted output. Although the two models prove to be good methods for solar radiation prediction, the WT-ANFIS model provides a better correlation between the measured and forecasted output, hence, outperforming the PSO-ANFIS model. Further validation was done by using two statistical evaluators RMSE and Table 1 presents the statistical values of the two hybrid models obtained at both the training and testing stages. From Table 1, when the obtained RMSE and R² values from the two hybrid models were compared, the WT-ANFIS model values outperforms that of the PSO-ANFIS model at both the training and testing phases.

CONCLUSION
In this study, two hybrid approaches based on PSO-ANFIS and WT-ANFIS were developed for horizontal solar radiation forecasting. The proposed models were based on the combination of ANFIS and PSO, and ANFIS and WT. Tmin, Tmax, SH, and RH were used as the inputs to the developed model, with SR as output to the model developed. The statistical performance assessment was performed using two statistical evaluators, RMSE and R² to assess the accuracy of the two models developed. The statistical evaluators were further used to compare the two models PSO-ANFIS and WT-ANFIS in order to assess the best model for solar radiation forecasting. The RSME and R² results obtained from the developed PSO-ANFIS model are 0.6832 and 0.9065 during the training phase and 1.3838 and 0.8058 respectively during the testing phase. Also, the RMSE and R² of the developed WT-ANFIS model are 0.23712 and 0.9887 during the training phase and 0.86759 and 0.8584 respectively during the testing phase. Based on the statistical evaluation, the WT-ANFIS outperforms the PSO-ANFIS for solar radiation forecasting. Therefore the hybrid WT-ANFIS is a better model for solar radiation prediction for the selected location in Nigeria.