Full text
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER Data-Driven Hyperparameter Optimized Extreme Gradient Boosting Machine Learning Model for Solar Radiation Forecasting Mantosh KUMAR1, Kumari NAMRATA1, Nishant KUMAR2 1Department of Electrical Engineering, National Institute of Technology, Adityapur, 831014 Jamshedpur, Jharkhand, India 2Department of Electrical Engineering, B. K. Birla Institute of Engineering & Technology, BKBIET Campus, CEERI Road, 333031 Pilani, Rajasthan, India man[email protected], [email protected], krnishan[email protected] DOI: 10.15598/aeee.v20i4.4650 Article history: Received Jul 31, 2022; Revised Sep 07, 2022; Accepted Nov 23, 2022; Published Dec 31, 2022. This is an open access article under the BY-CC license. Abstract. The uncertainty of the non-conventional sources especially solar energy caused due to spatiotemporal factors like temperature, pressure, relative humidity etc. is continuously disrupting the productivity and reliability of an integrated power system which motivates the researcher or energy industry for strategic forecasting solutions to enhance the proper scheduling and control of solar generation power plants. Several studies have been carried out; but still the objective of achieving accurate forecasting dependent on the spatiotemporal features is not achieved. To address this critical forecasting issue in this research article a hyper parametric tuning of the Extreme Gradient Boosting (XGB) machine learning model has been carried out using two met heuristic algorithms: Moth Flame Optimization (MFO) and Grey Wolf Optimization (GWO). The dataset comprises five years of metrological attributes collected from the National Renewable Energy Laboratory (NREL) for analysis. The validation of the proposed model has been done based on the five statistical errors: Max Error (ME), Mean Absolute Error (MAE), Coefficient of Determination (R2), Mean Square Error (MSE) and Root Mean Square Error (RMSE). The regressive assessment of all three models has confirmed that the XGB-MFO model outperformed the others as showing the highest R2score of 0.9337, 0.9011, 0.8744 and lowest RMSE values of 76.29 W·m−2, 41.90W·m−2and 95.94W·m−2for Global Horizontal Irradiance (GHI), Diffuse Horizontal Irradiance (DHI) and Direct Normal Irradiance (DNI) respectively which ensures the proposed model implementation for the prediction and production of solar power. Keywords Extreme Gradient Boosting, forecasting, Grey Wolf Optimization, Moth Flame Optimization, solar irradiance. 1. Introduction 1.1. Motivation The consistent availability of energy supply across the nation is essential to a nation’s economic prosperity [1]. With the rapid development of technology and urbanization [2], the need for a stable power supply is also increasing proportionally, pushing the power industry to complete shift on the Renewable Energy Sources (RES) in the long run-in order to fulfil the rising power consumption and reduce the greenhouse effect. As per recent International Energy Agency (IEA) analysis, the amount of energy produced via renewable sources surpassed 8,000 TWh in 2021, a record 500 TWh more than in 2020. At the same time hydropower decreased by 15 TWh, and wind and solar Photovoltaic (PV) output climbed by 270 TWh and 170 TWh, respectively. ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 549
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER The growth in worldwide CO2emissions in 2021 would have been 220 Mt greater without increased output from nuclear and renewable energy sources [13]. The total installed and pipelined solar capacity of India has been shown in Fig. 1 which depicts the progressive behaviour of the solar energy system [14]. Though the PV system is paving the path for clean energy, its intermittent nature makes its performance highly reliant on the weather and environment [15] and [16]. For the steady and secure integration of green energy sources into the present energy network accurate forecasting techniques have become essential [17] and [18]. Numerical Weather Prediction (NWP), statistical and Machine Learning (ML), and image-based methods are the three primary categories of solar forecasting techniques [19]. The NWP studies the forecasts of irradiance and weather while image-based approaches track and advection clouds using sky cameras, satellite photos, or shadow cameras to anticipate solar irradiance. Statistical and machine learning models ‘train’ themselves using past data and makes forecasts based on new input variable values. Statistical and ML methods can be used to a variety of time spans, but they are mostly used in hourly forecasting studies. Authors in [20] give an overview of trends in solar forecasting techniques. This report is for use only by authorised, paying subscribers of BRIDGE TO INDIA Energy Private Limited. Unauthorised use, reproduction, production, distribution and transmission of this report is expressly not permitted. | © BRIDGE TO INDIA Energy Private Limited, 2022 1 Figure: Total installed and pipeline capacity as on 31 March 2022, MW Source: BRIDGE TO INDIA research, MNRE Executive summary Q1 2022 was another bumper quarter as India added 4,418 MW solar power capacity, the second highest ever. Capacity addition was split 85:13:2 between utility scale, rooftop solar and off-grid solar at 3,759 MW, 575 MW and 84 MW respectively. Total installed capacity reached 56,812 MW by 31 March 2022. Total commissioned utility scale, rooftop solar and offgrid solar capacity is estimated at 45,692 MW, 9,563 MW and 1,557 MW respectively. Total project pipeline – projects allocated to project developers and at various stages of development – stands at 53,119 MW. R o o f t o p 9 , 5 6 3 O f f - g r i d 1 , 5 5 7 1 7 , 8 3 7 S t a t e g o v e r n m e n t 2 1 , 1 4 8 C & I 6 , 7 0 7 5 7 3 0 N T P C 1 0 , 8 8 6 S E C I 3 2 , 0 3 3 C e n t r a l g o v e r n m e n t N T P C 1 , 8 8 0 S E C I 2 8 , 0 4 9 1 , 2 2 1 O t h e r P S U s 2 , 1 0 4 O t h e r P S U s C e n t r a l g o v e r n m e n t 8 , 7 9 2 C & I S t a t e g o v e r n m e n t 1 2 , 2 9 4 COMMISSIONED 56,812 MW PIPELINE 53,119 MW Fig. 1: Total installed and pipelined capacity by 31st December 2021, in (MW) [2]. Several researchers have proposed various ML models with default hyperparametric values which provide different prediction outcomes. In the present scenario, the hybridisation of metaheuristic algorithms with the ML model is being carried out to improve the accuracy for the various range of hyperparameters [21] and [22]. Although XGB has a considerably good performing model, the parametric search is essential for the development of the basic structure of any ML model which can be performed by incorporating the optimization methods. To address this hyperparametric search and develop an effective ML model for accurate solar irradiance forecasting, in this research article the hyperparametric tuning of the basic model of the XGB regressor has been performed by hybridization of the two optimization algorithms namely mothflame optimization and grey wolf optimization method based on the 5 years dataset taken from NREL. 1.2. Status Quo of Solar Forecasting Using AI Over the last few decades, many attempts have been made to forecast Solar Radiation using different sorts of empirical models, such as cloudiness-based models [23], sunshine-based models [24], and hybrid models that estimate global solar radiation by incorporating other meteorological factors. It has been predicted using ANN [25] and SVM [26] and the recent studies have been tabulated in Tab. 1. 1.3. Contributions to the Paper The main objectives of our study are: 1. To create and analyze the XGB model for forecasting solar radiation utilizing web-based data, including. 2. To optimize the hyper parameters of the XGB model using MFO and GWO algorithms. 3. To compare all the three machine learning models accuracies and to find the best model among them for solar forecasting. The remaining section of the research article has been structured as follows: Sec. 2. illustrates the dataset used and proposed methodology applied while the description of the algorithms incorporated has been briefly explained in Sec. 3. Section 4. describes the performance metrics used for the determination of the best model and Sec. 5. briefly explains the overall result analysis of all the ML models. Finally, the article has been concluded with the future scope in Sec. 6. 2. Methodology 2.1. Site Selection As per the City Mayors Foundation, Jamshedpur, with coordinates (22◦47’33 “N, 86◦11’03 “E) is the 84th fastest-rising city globally. The Indian Meteorological Department Centre in Ranchi reports that Jamshedpur was the state’s hottest location in 2022, with a scorching temperature of up to 43 ◦C [27]. Temperatures range from a minimum of 5 ◦C in winter to a maximum of about 43 ◦C in summer, and the average temperature of Jamshedpur is 25.7 ◦C [28]. ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 550
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER Tab. 1: Literature survey of latest solar forecasted methods. Authors Objective Solution Jebli et al. [3] ML models with the Pearson coefficient used to predict the real-time and shot time solar power. Linear Regression (LR), Support Vector Regression model (SVR), Random Forest (RF), Multilayer Perceptron (MLP) Kumari et al. [4] An ensemble XGB-DNN method proposed for the estimation of the GHI on an hourly basis Extreme Gradient Boosting (XGB), Deep Neural Network (DNN) Trizoglou, et al. [5] Authors have applied the XGB and LSTM in association with the SCADA system of wind turbines for forecasting of faults and reduce the operation and maintenance cost. XGB, Long Short-Term Memory (LSTM) Lee et al. [6] An ensemble technique for forecasting the solar radiation for a short duration used which shows more reliable outputs as compared to individual ML models. Ensemble Method BaggedTrees, Boosted-Trees, RF, Support Vector Machines (SVM), Gaussian Process Regression (GPR) Massaoudi et al. [7] A Stacking method used to combine the three ML models (XGBLGBM-MLP) to forecast the grid load for short duration. Stacking (XGB-LGBM-MLP) Mokbal et al. [8] Extreme Gradient Boosting Cross-Site Scripting (XGBXSS) method used for detecting the Cross-Site Scripting attacks where XGB has been applied with the feature selection and a recursive optimization. XGB, Grid Search Fan et al. [9] ML models were used to predict the transpiration of daily maize and it was concluded that the DNN model is more efficient for daily maize T estimate. XGB, Artificial Neural Networks (ANN), DNN, SVM Nguyen et al. [10] XGB applied to forecast the punching shear resistance of R/C interior slabs. The designed XGB model’s prediction accuracy for punching shear strength was investigated and compared to other machine learning models and empirical models. XGB, ANN, RF Chia et al. [11] XGB with met heuristic models i.e. MFO, Whale Optimization Algorithm (WOA) and Particle Swarm Optimization (PSO) have been used for evapotranspiration estimation XGB with PSO, MFO, WOA Rui Liu et al. [12] GWO has been incorporated with ML models for groundwater potential prediction. GWO with RF and SVM 2.2. Data Pre-processing The meteorological data is in its raw state and must be pre-processed before it can be used. In the data pre-processing, there is a combination of the following four processes. Figure 2 depicts the workflow for our experiment. 1. Data Cleaning: It involves checking for repeated, duplicate, and Not Applicable (NA) entries in the data. 2. Data Normalization: Here, all data variables are normalized to a common interval, which is often between 0 and 1. This phase compares the values of numerous variables. 3. Feature Extraction: Here, only important features are picked, as including unnecessary features increases data size and slow down a forecasting algorithm’s learning speed and accuracy. It is done through Exploratory Data Analysis (EDA) process. 4. Data Splitting: The pre-processed dataset is divided into test and training sets and sent to the forecasting phase. Metrological Data Data Cleaning Data Normalization Feature Extraction Data Preprocessing Trainig Data Testing Data Preprocesssed Data XGB Model MFO GWO Performacne Parameters MSEMAE MAPERMSE R2 Score Best ML Model Fig. 2: Methodology of the proposed work. ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 551
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER 3. Forecasting Algorithm Used 3.1. Extreme Gradient Boosting (XGB) ML Model Chen and Guestrin developed the XGB algorithm as a revolutionary implementation approach for Gradient Boosting Machines, namely Regression Trees and K Classification [29]. XGB is designed to avoid over fitting and optimizing computation resources at the same time. During the training phase of XGB, calculations are also performed synchronously and automatically for all the functions. The model’s final prediction is calculated as the sum of each model’s predictions. The pseudo-code description for XGB is given by Algorithm 3 and the schematic diagram for the XGB algorithm is shown in Fig. 3. )(y ˆ 1 xf n ii X, y T1TkT n f1fk result Fig. 3: XGB model. 3.2. Moth Flame Optimization (MFO) In 2015, author in [30] proposed the MFO algorithm, which was motivated by the mirroring behaviour of moths. These moths employ a peculiar kind of nocturnal triangulation known as transverse orientation, which allows moths to hover in a straight line by remembering the stationary perspective parallel to the moon. Moths float in spiral patterns in the latency of an unreal source of light that is close to the moon by focusing upon the source of light. AM = AM1 AM2 . . . AMa .(5) Moths and flames are two significant components of the MFO structure. The moths that hover in a deeply engaged, d-dimensional plane act as search mediators. In the Mmatrix, the dwelling is reserved. The fitness value relevant to each month is subsequently stored in array AM. The size of a moth Algorithm 1 Implementation of XGB. 1: Input: Dataset D, X (Features) and y (Target) loaded with training labelled data, parameters (estimators, learning rate, maximum depth etc.). Output: System accuracy in terms of performance metrics. 2: Initialize a base model with: f0(x) = arg min γ m X i=1 L(yi, γ)+Ω.(1) 3: while (stopping criterion) do 4: for t= 1,t+ + do 5: for i= 1 to mdo 6: Compute residual, rit: rit =−∂L (yi, f (xi)) ∂f (xi)f−fi−1 .(2) 7: end for 8: for j= 1 to Jtdo 9: Fit the weak tree to rit. 10: Compute revised loss function: γjt = arg min γX xi L(yi, ft−1(xi) + γ).(3) 11: Update model function: ft(x) = ft−1(x) + Jm X j=1 γjmI(x∈Rjm).(4) 12: end for 13: end for 14: end while 15: Model fitting with training data. 16: Model validation with testing data. and a flame are the same. Moth and flame both function as parts of the algorithmic solution. Flame denotes the moth’s ideal position, whereas the moth denotes the hunting agent. Moths revolves around the flames that serve as flag throughout the search process. As a result, both positions are being updated, decreasing the likelihood that one would be lost. According to Eq. (6), the moth’s location is updated. Mj=SF (Mj, Fj),(6) where Mjindicates the jth moths, whereas Fjrepresents the jth flames and SF is for spiral function which is expressed in Eq. 7. SF (Mj, Fj) = Dj ∗ebt∗cos(2πt) + Fj,(7) where, bis spiral constant, tis the arbitrary value (−1,1) and Djis jth moth and jth flame Euclidean ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 552
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER distance. Djis represented as Eq. (8). Dj=|Fj−Mj|.(8) In the initial stage, flames and moths remain to be the exact number, which may reduce the potential of sophisticated solutions to be diverse due to moths’ conscious choice of ndistinct locations in the quest of room for updating. Eq. (9) is used to update the flames. Fno = round F−j∗F−1 irmax O.(9) 3.3. Grey Wolf Optimization (GWO) GWO, modelled on the natural hunting tactics of grey wolves is a meta-heuristic optimization technique proposed in 2014 by authors in [31]. Every wolf in GWO symbolizes a search agent (potential solution). GWO classifies the wolves into four categories alpha (α), beta (β), gamma (δ) and omega (ω) by replicating the grey wolf population’s hierarchy. The wolves in the first three grades correspond to the current three best solutions. The current three best solutions are represented by the wolves in the first three categories (α,β,δ). The (ω) wolves follow the pack’s strongest wolves. 1) Encircling Grey wolves surround their prey as part of the hunting process. So, the initial phase of the mathematical modelling of the GWO is to surround the target, which may be expressed by the following formulas [16] and [17]. DGW = C· Xp GW (t)− XGW (t),(10) XGW (t+ 1) = Xp GW (t)− A· D,(11) where, Aand Care noted as the coefficient vectors and tis symbolised as the current iterations. XGW signifies grey wolf position vector and Prey’s position vector is indicated by Xp GW whereas, the DGW is the vector which depends on Xp GW . Computation for the coefficient vectors Aand Care as follows: A= 2a ·r1−a, (12) C= 2 ·r2,(13) a = 2 −2itr itrmax ,(14) where, r1and r2are random variables in the interval [0, 1] and values of a are linearly decreasing from 2 to 0 throughout the span of iterations. Concisely, r1and r2 vectors enable wolves to extend to any location. Accordingly, Eq. (13) and Eq. (14) indicates that the grey wolf may update their position inside the search space (space circling prey) at any random point. The same approach could be employed in a search space with dimension n, where the grey wolves will circle the best outcome thus far in hyper-cubes or hyper-spheres. 2) Hunting The αusually leads the hunt while the βand δmay occasionally engage in hunting. We postulate that the alpha (best solution), beta, and delta have superior information about the probable location of prey to mathematically imitate the hunting behaviour of grey wolves. Therefore, we reserve the first three best responses. Thus, to compel the other searching agent, along with omegas and to upgrade their positions in accordance with the status of the top search agents. The below mentioned Eq. (15), Eq. (16), Eq. (17) and Eq. (18) are followed for above stated context: XGW (t+ 1) = X1 GW + X2 GW + X3 GW 3,(15) X1 GW = Xα GW − A1· C1· Xα GW − XGW ,(16) X2 GW = Xβ GW − A2· C2· Xβ GW − XGW ,(17) X3 GW = Xδ GW − A3· C3· Xδ GW − XGW .(18) 3) Searching and Attacking Prey Grey wolves primarily use the (α), (β), and (δ) positions to guide their search. They disperse from one another to look for prey and then reassemble to attack it. We use Awith random values higher than 1 or less than −1to force the search agent to diverge from the prey to mathematically simulate divergence. This encourages exploration and enables a wide search for the GWO algorithm. As already mentioned, after the prey stops moving, the grey wolves attack it to end the hunt. We lower the value of a to mathematically simulate approaching the prey. Keeping in mind the reduction occurring in Amay also decrease by a . In other respects, a decreases from 2 to 0 throughout the duration of iterations, and Ais a random number in the range [2a, 2a]. Asearch agent’s future position may be anywhere between its present position and the prey’s position when random numbers of Aare in the range [1, 1]. 4. Performance Parameters To quantify the performance and their variation from the real value for the ML models, we provide ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 553
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER Algorithm 2 Pseudo code of GWO. 1: Input: Wolf Population (N), A,a, and C. Output: Optimal solution (R2). 2: Fitness Calculation of search agent (i.e Grey wolves). Xα GW best optimal solution (search agent). Xβ GW second best optimal solution (search agent). Xδ GW third best optimal solution (search agent). 3: while (itr < itrmax)do 4: for i= 1,2,3,...N do 5: Update current position using Eq. (18). 6: end for 7: Update A,a, and C. 8: Fitness Calculation of search agent. 9: Update Xα GW , Xβ GW and Xδ GW . 10: itr =itr + 1. 11: end while 12: return Xα GW . several common statistical metrics. The difference between the estimated (or anticipated) and actual output parameter is known as the deviation sometimes referred to as the errors or residue. For example, the error for GHI can be expressed as: δ=GHIobs −GHIpred .(19) These can be used to assess the degree of divergence and correlation between the predicted and actual data. Figure 4 depicts the expressions for forecasting the effectiveness of ML models in our research. ME MAE MSE RMSE R2 Mean Absolute Error helps users to formulate learning problems into optimization problems. It also serves as an easy-tounderstand quantifiable measurement of errors for regression problems. Mean Squared Error is the average of the squared deviation between the observed and expected values across all instances in a data set. Root Mean Square Error is the standard deviation of the residuals (prediction errors), i.e. a measure of how far from the regression line data points are. R-Squared is a statistical measure of fit that indicates how much variation of a dependent variable is explained by the independent variable(s) in a regression model. Max Error is the absolute value of the most significant difference between a predicted variable and its real value. Where is observed value is predicted value and is mean value. i y j y ˆ j y jj j ME Max y y 2 1 2 1 1 n jj j n jj j yy R yy 1 1n jj j MAE y y n 2 1 1n jj j MSE y y n 2 1 1n jj j RMSE y y n Fig. 4: Performance Evaluation parameter used in our work. 5. Results and Discussion The objective of the study is to develop an optimized system for forecasting solar irradiance using the XGB model for the selected region, as well as two optimization techniques have been incorporated to optimize the parameters of the XGB to enhance the performance of prediction. Numerous research papers have been published about the study of this kind of model. Due to the complexity of the time series and the accumulation of forecasting mistakes, it is still difficult to determine how to best optimize the XGB model, using the met heuristic optimization techniques for the prediction of solar irradiation. Hence, two hybrid model XGB-MFO and XGBGWO have been analysed for the forecasting purpose. Initially the 70 % of dataset i.e., training data has been used for the training the two hybrid models and the functions built into the system are evaluated by comparing the forecasted results to the real outcomes based on statistical errors. This validates the recommended methodological approach used. On the validation dataset, which includes 30 % of the dataset, five evaluation metrics MAE, MSE, RMSE, ME and R2 score is utilised to determine the best hyper parametric optimized model. The model with the lowest error and highest accuracy is finally noted as the best predictive model. It’s crucial to keep in mind that the population size of each hybrid model varies and changing this parameter’s value will have an immediate impact on the model’s running duration and ability to identify the overall best solution. A large population will greatly lengthen the running time, which will make it difficult to apply the models to engineering problems, while a small population would result in unstable fitness values. Five population sizes - 50, 100, 150, 200 and 500 were used in this study to construct the two hybrid models. The whole system has been designed using Python language where the system has been trained for 3 years and validated for the next 1 year i.e., 35,078 entries have been used for model training and 4,922 entries applied for validating the model to obtain the optimum result. 5.1. Performance of XGB ML Model Tab. 2: Selected values for XGB Hyper-parameters. Sl. No. Description Value 1 Maximum no. of trees 100 2 Maximum depth 5 3 Learning rate 0.001 ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 554
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER Tab. 3: Performance evaluation parameters outcomes for XGB without optimization. MAE MSE RMSE ME R2score (W·m−2) (W·m−2) (W·m−2) (W·m−2) Train Test GHI 38.144 6449.03 80.30 791.74 0.9720 0.9278 DHI 25.265 2317.48 48.14 363.31 0.9611 0.8751 DNI 50.471 9318.99 96.53 692.92 0.9189 0.8527 Generally subsampling happens once for every tree in XGB. Increasing the depth of the tree makes the model more complicated and prone to over fitting. To prevent over fitting, step size shrinking is employed in the weight update with the help of learning rate. We may immediately obtain the new weights of the features after each boosting step, and the learning rate, here, lowers the weights of the feature to make the boosting method more conservative. The parameters selected for the analysis the XGB model without optimization has been shown in Tab. 2 where hyper parameters has been fixed. The evaluation parameters obtained using the selected hyper parametric values have been tabulated in Tab. 3 which shows the higher error values for DNI than GHI and DHI while the R2score of GHI is approximately 8 % higher as compared to the DHI and DNI parameter. The efficiency of the model can be improved using the proper parameters of the XGB model. To optimize the model, the range of various internal parameters of the XGB has been taken as shown in Tab. 4 which will be optimized using the two optimization methods i.e., MFO and GWO. The iteration for both optimization methods has been fixed to 100 to analyse the effect of increasing the population size. The evaluation parameters for determining the effect of the MFO and GWO optimization on the XGB model has been shown in Tab. 5 and Tab. 6, where all the five parameters for the target variable GHI, DHI and DNI have been calculated for the various population size to check the best population of the naturebased algorithm with respect to the fixed iteration count. The best values for each parameter have been highlighted in bold which shows that the model has been optimized as the statistical errors have been reduced and the accuracy of the model has been considerably improved. The graphical representation of the accuracy of the XGB-MFO model for various population sizes has been shown in Fig. 5. Tab. 4: Selected values for XGB hyper-parameters. Sl. No. Description Upper Lower bound bound 1 Maximum no. of trees 100 1000 2 Maximum depth 5 50 3 Learning rate 0.001 0.1 Additional testing of the novel approach will be necessary for data derived from weather forecasts. However, the model must employ predicted weather information to be useful. The model would be especially helpful for applications on a wider scale (i.e., county, or regional scale). This is possible due to the ability to smooth out the quick change in local meteorological conditions that causes the intra-hourly fluctuation in solar irradiance. Larger-scale PV output tests in conjunction with anticipated weather data encourage the proper use of the proposed model. DNI DHI 0.85 N=50 N=100 N=150 N=200 N=500 Population size Train Test 0.9 Train Test Train GHI Test R2 score Train Test Train 0.95 Test 1 Fig. 5: R2score analysis using XGB-MFO (100 iterations). 5.2. Comparative Analysis In this section, all three models i.e., XGB, XGBMFO and XGB-GWO are compared with the best parameters to identify the well-suited ML model for forecasting solar irradiance. The overall best comparative performance analysis has been represented in Tab. 7, which shows that the XGB-GWO has an accuracy of 0.63 %, 2.88 % 2.48 % and XGB-MFO has 0.53 %, 2.73 % and 2.40 % accuracy more than that of the unoptimized XGB model for GHI, DHI and DNI respectively. The RMSE values have also been reduced by 4.98 %, 12.94 %, 0.61 % using XGB-GWO and 4.35 %, 12.31 % and 0.30 % using XGB-MFO predicted model for the three target parameters which clearly signifies the contribution the meta-heuristic algorithms with the ML models. The corresponding population sizes were 100, 200 and 150 which shows the importance of the proper selection of population sizes. The best outcomes in the table have been highlighted. Overall, we can state that XGB-GWO outperforms the other two models for the given datasets and location. The comparative analysis has also been represented in Fig. 6. ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 555
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER Tab. 5: Performance evaluation parameters outcomes for XGB-MFO. Iterations Population MAE MSE RMSE ME R2score size (W·m−2) (W·m−2) (W·m−2) (W·m−2) Train Test GHI 100 50 33.8953 5947.45 77.0114 726.15 0.9611 0.9314 100 33.4033 5899.41 76.8076 738.05 0.9678 0.9328 150 32.8728 5939.38 77.0674 748.90 0.9744 0.9323 200 33.2459 5983.11 77.3505 743.24 0.9584 0.9318 500 33.2469 6023.76 77.6128 750.95 0.9514 0.9314 DHI 100 50 20.1519 1841.72 42.9153 361.75 0.9459 0.8963 100 20.0928 1834.19 42.8274 364.53 0.9384 0.8968 150 20.8935 1859.86 43.1260 361.86 0.9368 0.8953 200 20.7235 1781.66 42.2097 349.77 0.9637 0.8997 500 20.1217 1838.93 42.8827 365.12 0.9432 0.8965 DNI 100 50 48.7757 9258.24 96.2197 683.43 0.9602 0.8736 100 49.0448 9276.45 96.3143 694.41 0.9401 0.8735 150 48.9292 9262.21 96.2404 693.43 0.9498 0.8737 200 49.3427 9377.84 96.8392 699.48 0.9340 0.8721 500 49.6549 9446.23 97.1917 697.78 0.9319 0.8712 Tab. 6: Performance evaluation parameters outcomes for XGB-GWO. Iterations Population MAE MSE RMSE ME R2score size (W·m−2) (W·m−2) (W·m−2) (W·m−2) Train Test GHI 100 50 33.4417 5823.47 76.3117 705.48 0.9822 0.9336 100 33.0237 5821.60 76.2994 685.70 0.9884 0.9337 150 33.70866 5906.59 76.8543 739.83 0.96533 0.9327 200 32.7415 5944.24 77.0988 747.75 0.9613 0.9323 500 32.97887 5978.46 77.3205 747.09 0.9604 0.9319 DHI 100 50 19.8547 1805.28 42.4886 361.32 0.9651 0.8984 100 19.9677 1829.09 42.7679 363.31 0.9481 0.8979 150 20.74984 1843.34 42.9342 356.59 0.9441 0.8962 200 20.46198 1756.35 41.9088 352.06 0.9788 0.9011 500 20.1074 1785.00 42.2493 357.94 0.9613 0.8995 DNI 100 50 48.5425 9058.75 95.1774 673.65 0.9674 0.8739 100 48.9012 9241.05 96.1304 687.33 0.9479 0.8740 150 48.8938 9205.37 95.9446 671.52 0.9612 0.8744 200 48.9643 9244.79 96.1498 690.55 0.9434 0.8739 500 49.0030 9392.69 96.9159 692.02 0.9308 0.8719 Tab. 7: XGB models comparative analysis. ML MAE MSE RMSE ME R2score models (W·m−2) (W·m−2) (W·m−2) (W·m−2) Train Test GHI XGB 38.1442 6449.03 80.3058 791.74 0.9720 0.9278 XGB-MFO 33.4033 5899.41 76.8076 738.05 0.9678 0.9328 XGB-GWO 33.0237 5821.60 76.2994 685.70 0.9884 0.9337 DHI XGB 25.2654 2317.48 48.1402 363.31 0.9611 0.8751 XGB-MFO 20.7235 1781.66 42.2097 349.77 0.9637 0.8997 XGB-GWO 20.46198 1756.35 41.9088 352.06 0.9788 0.9011 DNI XGB 50.4714 9318.99 96.5349 692.92 0.9189 0.8527 XGB-MFO 48.9292 9262.21 96.2404 693.43 0.9498 0.8737 XGB-GWO 48.8938 9205.37 95.9446 671.52 0.9612 0.8744 XGB-GWO (train) XGB-MFO (train) XGB (train) XGB-GWO (test) XGB-MFO (test) XGB (test) GHI DHI DNI GHI DHI DNI GHI DHI DNI 0.8 0.85 0.9 0.95 1 R2score Fig. 6: Comparative analysis of all models based on R2score. 6. Conclusion The prediction of accurate solar irradiance is very useful for the forecasting of solar energy. The main goal of these techniques is to modify the XGB’s combination of hyper parameters using most prominent optimization algorithms, such as GWO, and MFO, to increase the prediction accuracy which can be useful for engineering practise. As a result, in this study, the XGBMFO and XGB-GWO hybrid models have been created. Five statistical parameters were chosen to assess the consistency between the actual value and the fore- ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 556
POWER ENGINEERING AND ELECTRICAL ENGINEERING VOLUME: 20 |NUMBER: 4 |2022 |DECEMBER casted value to examine the performance of each hybrid model. An unoptimized XGB model was also developed, verified, and trained using the NREL historical datasets to evaluate the performance of the two optimization techniques. The experimental findings show that both in the training stage and the test stage, the two XGB-based hybrid models performed much better than the unoptimized XGB model. The two hybrid models’ prediction accuracy exceeded 0.9 during testing, particularly the XGBGWO model (for GHI, R2score: 0.9337; MSE: 5821.60; RMSE: 76.2994; ME: 685.70; MAE: 33.0237), whose prediction accuracy reached 0.93 which ensures the proposed model applicability for the further forecasting purpose. Author Contributions M.K. has collected and analysed the data along with computation and mathematical modelling for the methodology adopted. K.N. supervised the project and formatted the manuscript. N.K. has worked in optimization technique formulation and assisted in editing and formulating the manuscript. References [1] GUO, Z., K. ZHOU, C. ZHANG, X. LU, W. CHEN and S. YANG. Residential electricity consumption behavior: Influencing factors, related theories and intervention strategies. Renewable and Sustainable Energy Reviews. 2018, vol. 81, iss. 1, pp. 399–412. ISSN 1364-0321. DOI: 10.1016/j.rser.2017.07.046. [2] ZHANG, Y., C.-Q. HE, B.-J. TANG and Y.-M. WEI. China’s energy consumption in the building sector: A life cycle approach. Energy and Buildings. 2015, vol. 94, iss. 1, pp. 240–251. ISSN 0378-7788. DOI: 10.1016/j.enbuild.2015.03.011. [3] JEBLI, I., F.-Z. BELOUADHA, M. I. KABBAJ and A. TILIOUA. Prediction of solar energy guided by pearson correlation using machine learning. Energy. 2021, vol. 224, iss. 1, pp. 1–20. ISSN 0360-5442. DOI: 10.1016/j.energy.2021.120109. [4] KUMARI, P. and D. TOSHNIWAL. Extreme gradient boosting and deep neural network based ensemble learning approach to forecast hourly solar irradiance. Journal of Cleaner Production. 2021, vol. 279, iss. 1, pp. 1–14. ISSN 0959-6526. DOI: 10.1016/j.jclepro.2020.123285. [5] TRIZOGLOU, P., X. LIU and Z. LIN. Fault detection by an ensemble framework of Extreme Gradient Boosting (XGBoost) in the operation of offshore wind turbines. Renewable Energy. 2021, vol. 179, iss. 1, pp. 945–962. ISSN 0960-1481. DOI: 10.1016/j.renene.2021.07.085. [6] LEE, J., W. WANG, F. HARROU and Y. SUN. Reliable solar irradiance prediction using ensemble learning-based models: A comparative study. Energy Conversion and Management. 2020, vol. 208, iss. 1, pp. 1–13. ISSN 0196-8904. DOI: 10.1016/j.enconman.2020.112582. [7] MASSAOUDI, M., S. S. REFAAT, I. CHIHI, M. TRABELSI, F. S. OUESLATI and H. ABURUB. A novel stacked generalization ensemblebased hybrid LGBM-XGB-MLP model for Short-Term Load Forecasting. Energy. 2021, vol. 214, iss. 1, pp. 1–14. ISSN 0360-5442. DOI: 10.1016/j.energy.2020.118874. [8] MOKBAL, F. M. M., W. DAN, W. XIAOXI, Z. WENBIN and F. LIHUA. XGBXSS: An Extreme Gradient Boosting Detection Framework for Cross-Site Scripting Attacks Based on Hybrid Feature Selection Approach and Parameters Optimization. Journal of Information Security and Applications. 2021, vol. 58, iss. 1, pp. 1–20. ISSN 2214-2126. DOI: 10.1016/j.jisa.2021.102813. [9] FAN, J., J. ZHENG, L. WU and F. ZHANG. Estimation of daily maize transpiration using support vector machines, extreme gradient boosting, artificial and deep neural networks models. Agricultural Water Management. 2021, vol. 245, iss. 1, pp. 1–12. ISSN 0378-3774. DOI: 10.1016/j.agwat.2020.106547. [10] NGUYEN, H. D., G. T. TRUONG and M. SHIN. Development of extreme gradient boosting model for prediction of punching shear resistance of r/c interior slabs. Engineering Structures. 2021, vol. 235, iss. 1, pp. 1–14. ISSN 0141-0296. DOI: 10.1016/j.engstruct.2021.112067. [11] CHIA, M. Y., Y. F. HUANG and C. H. KOO. Swarm-based optimization as stochastic training strategy for estimation of reference evapotranspiration using extreme learning machine. Agricultural Water Management. 2021, vol. 243, iss. 1, pp. 1–15. ISSN 0378-3774. DOI: 10.1016/j.agwat.2020.106447. [12] LIU, R., G. LI, L. WEI, Y. XU, X. GOU, S. LUO and X. YANG. Spatial prediction of groundwater potentiality using machine learning methods with Grey Wolf and Sparrow Search Algorithms. Journal of Hydrology. 2022, ©2022 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 557