Solar Radiation Prediction Using a Novel Hybrid Model of ARMA and NARX

: The prediction of solar radiation has a signiﬁcant role in several ﬁelds such as photovoltaic (PV) power production and micro grid management. The interest in solar radiation prediction is increasing nowadays so efﬁcient prediction can greatly improve the performance of these different applications. This paper presents a novel solar radiation prediction approach which combines two models, the Auto Regressive Moving Average (ARMA) and the Nonlinear Auto Regressive with eXogenous input (NARX). This choice has been carried out in order to take the advantages of both models to produce better prediction results. The performance of the proposed hybrid model has been validated using a real database corresponding to a company located in Barcelona north. Simulation results have proven the effectiveness of this hybrid model to predict the weekly solar radiation averages. The ARMA model is suitable for small variations of solar radiation while the NARX model is appropriate for large solar radiation ﬂuctuations.


Introduction
In the last decades, the integration of renewable energies into the electrical grid has become the main challenge in different countries following the high consumption of electric energy in the world and the increase of oil and coal prices [1,2]. Furthermore, renewable energies can be the adequate solution for isolated and rural areas as well as for beacons at sea. Solar energy is among the key renewable energies, it is clean and available and it can be directly captured through a PV system. Parameters associated with electrical equivalent models of PV systems have great importance in its performance enhancement. However, the accurate estimation of these parameters represents a challenging task due to the nonlinear characteristics of the PV modules/panels and the higher computational complexities [3,4]. On the other hand, PV power production is mainly based on solar radiation, it is completely absent at night and available during the day, it is low in winter and high in summer and for the same day it is likely to be fluctuating because it is influenced by some weather conditions. This is the cause of PV power production intermittence which causes several problems when integrating the micro grid [5]. To minimize and/or avoid these problems, PV power prediction, or rather solar radiation prediction represents an excellent solution. Moreover, it is important to select the appropriate prediction technique to obtain an accurate solar radiation prediction. In the literature, there are several ways to predict solar radiation; they can be broadly divided into two categories, numerical weather prediction models and statistical models [6,7]. The first category is based on historical data and the reproduction of several physical factors related to the atmosphere processes such as the interaction between earth and solar radiation and the radiative absorption by ozone [8]. The other category treats solar radiation as time series and follows the evolution of solar radiation over time. Based on the historical radiation data, a model is created to characterize the behavior and the dynamic of solar radiation evolution in the past. The prediction of solar radiation on a given time is then based on the created model. This second category is the most used, in the previous few years, different solar radiation prediction approaches have been proposed. Benali et al. [9] used the Artificial Neural Network (ANN), the Smart Persistence, and the Random Forest methods to forecast the three components of solar radiation based on the site of Odeillo in France. They showed that the Random Forest is the most efficient compared to both other methods. For h + 6 time horizon, the Normalized Root Mean Squared Error (nRMSE) is computed for these three solar radiation components, it reached 27.78% for the global horizontal radiation, 49.08% for the beam normal radiation, and 35.08% for the diffuse horizontal radiation. In [10] authors applied a deep Long Short-Term Memory Recurrent Neural Network (LSTM-RNN) to predict day-ahead solar radiation. As input data, they introduced only temperature and humidity of six different locations. The predicted solar radiation is then used to estimate the PV power installed in a micro grid building in Golden and Colorado. Simulation results have proven the optimal operation of this micro grid over one year following the use of the proposed forecasting model. Eleven statistical and machine models were analyzed and applied in [11] to forecast solar radiation for medium time horizon. This forecasting was performed for three different sites located in France, Odeillo, Ajaccio, and Tilos. Simulation results have proven the effectiveness of ARMA model and Multilayer Perceptron (MLP) to predict the solar radiation with weak variability on Ajaccio site. For Tilos, which is characterized by a medium variability, the ARMA and Bagged Regression Tree have given the best performances. The forecasting reliability is lower for Odeillo with higher solar radiation variability, but the best performances were obtained using the Random Forest approach and Bagged Regression Tree. Bixuan et al. [12] presented an approach based on Gated Recurrent Unit (GRU) and weather forecasting to predict the solar radiation over a horizon of 24 h. Experimental results have shown the accuracy of this approach compared to other techniques [12]; it reduces the Root Mean Square Error (RMSE) by 23.3% compared to Back Propagation Neural Network (BPNN) and by 11.9% compared to Recurrent Neural Network (RNN), it can also shorten the training time. A review of solar radiation prediction using an Artificial Neural Network (ANN) is presented by Kumar and Chandel in [13], they pointed out that ANNs predict solar radiation more accurately than conventional techniques, but their performance is dependent on the input parameters introduced. Qazi et al. [14] reviewed the forecasting of solar radiation using ANN and they concluded that their performance depends not only on input parameters but also on neuronal architecture type and the training algorithm. The research study presented in [15] aimed to forecast the daily and monthly solar radiation in Seoul, South Korea, using the Auto Regressive Integrated Moving Average (ARIMA) model. A large amount of historical solar radiation data was used from 1981 to 2017 as a training and testing dataset. Simulation results have proven the ability of the ARIMA model to predict the daily and monthly solar radiation. These good forecasting results have been explained by the convenience, the accurate prediction, and the simple computations which characterize the ARIMA model. ARMA has been the focus of several other studies [16,17], it was used in [16] to forecast the solar radiation and then compared with the persistence model. Simulation results have shown that ARMA outperforms the persistence model on the short and medium horizon. The study presented in [17] has applied the ARMA model to predict the global solar radiation for 24 h at Dakar, Senegal. The effectiveness of ARMA has been proven in this work and it can be used as a decision support tool for planning PV solar power plant production in Senegal and its surroundings. Although these previous solar radiation forecasting techniques, especially ANN and ARMA models, are efficient for some applications, they are not suitable for some others for which high forecasting precision is required. In order to improve the accuracy of solar radiation forecasting, several researchers have proposed hybrid models. Valenzuela et al. [18] proposed a model which combined ANN with ARIMA techniques in order to predict time series. It is proven that the obtained results using this hybrid model were improved compared to those obtained Energies 2021, 14, 6920 3 of 26 when ANN and ARIMA are used separately. Therefore, these studies have been carried out in [19], and they have shown the efficiency of a hybrid model combining ARIMA and ANN to predict water time series. A hybrid model compound of ARMA and TDNN (Time Delay Neural Network) was proposed by Ji Wu and C.K Chan to predict time series solar radiation [20]. This hybrid model is applied after using each technique (ARMA and TDNN) separately. The efficiency of TDNN has been proven to predict the nonlinear component of solar radiation while the ARMA model is rather better on the linear component. To further improve the prediction accuracy, the authors proposed benefitting from the features of the two models by combining them into a single one. The prediction results given by the hybrid model were improved especially for non-cloudy days. Some other hybrid models have thus been applied for the prediction of solar radiation such as wavelets combined with ANN [21] and Marcov chains with ANN [22]. Che et al. suggested a novel approach which combines between Kalman Filter and mesoscale numerical weather prediction technique. A dataset of two sites in Japan and China was used to validate the capability of this model to forecast day-ahead solar radiation [23]. Halabi et al. proposed the use of an Adaptive Neuro Fuzzy Inference System (ANFIS) for forecasting the monthly global radiation in Malaysia. The maximum and minimum temperature, monthly rainfall, clearness index, and sunshine duration are used as inputs for this model [24]. In this research work, ANFIS is also combined with three evolutionary algorithms such as Particle Swarm Optimization (PSO), Genetic Algorithm (GA), and Differential Evolution (RE). Prediction results of these different hybrid models were compared and the highest performance was given by ANFIS and PSO [24]. A literature review of hybrid models for solar radiation forecasting is presented by Guermoui et al. [25]. Compared to stand alone models, authors observed the high performance and the accurate forecasting of all proposed hybrid models. However, in these different aforementioned research studies the combination between models was carried out randomly without presenting any prediction strategy.
In this present paper, a novel hybrid model is proposed to predict the solar radiation, it combines ARMA and NARX. This choice is performed in order to take advantages of these two models. Therefore, a proposed prediction strategy is followed in order to predict solar radiation in an accurate and efficient way. Indeed, ARMA is applied firstly to predict the solar radiation for a given winter and summer day, then, it is used to predict the daily and weekly solar radiation averages. These different tests are performed with the objective to follow the performances of ARMA model on solar radiation prediction for different conditions and to retain the best performance results. These different tests are presented and discussed for four scenarios. The ARMA model has given the best results for the prediction of weekly solar radiation averages. To further improve these results, the NARX model is combined with ARMA to form a hybrid predictor model.
The remainder of this paper is organized as follows: in Section 2, the ARMA model is presented and applied to forecast solar radiation for different conditions (winter day, summer day, ...). Prediction results are discussed for four different scenarios. In Section 3, the NARX model is presented, and an optimal neural network architecture is performed. It is then used to predict the weekly solar radiation average. Section 4 presents a hybrid model which combines ARMA and NARX to predict the solar radiation. Results and discussion are given in Section 5. Finally, a conclusion is presented to summarize the main findings of this study.

Solar Radiation Prediction Using the ARMA Model
ARMA is the combination of two different sub-models, Auto Regressive (AR) and Moving Average (MA). It is applied to auto-correlated time series data. ARMA model is characterized by its ability to extract useful statistical properties and its flexibility since it can represent several time series types by using different orders. The major requirement of ARMA is that the time series must be stationary [6]. It is widely used for the prediction of time series. Its effectiveness to predict solar radiation has been proven in several research works [17,20]. The AR presumes that each point can be predicted performing the p previous points and taking into account a random error term as presented in Equation (1).
(1) α i terms represent the AR model coefficients and ε t is the white noise. The MA presumes that each point can be written taking into account the sum of the q previous errors and its own error, as presented in Equation (2), β i are the MA coefficients, α i and β i are estimated by Box and Jenkins methodology [26]. A combination of AR and MA gives the ARMA(p,q) model as described in Equation (3), The aim of this work is to accurately predict the solar radiation. This objective cannot be reached without performing an effective prediction strategy. Therefore, this study begins with an observation of the solar radiation database which is already treated and cleaned in the research work presented in [27]. It is solar radiation measurements that are taken for an industrial company located in Barcelona north [28]. These measurements are recorded for every day with a frequency of five minutes throughout a year. Data measurements are presented in Figure 1. of time series. Its effectiveness to predict solar radiation has been proven in several research works [17,20]. The AR presumes that each point can be predicted performing the p previous points and taking into account a random error term as presented in Equation (1).
αi terms represent the AR model coefficients and εt is the white noise. The MA presumes that each point can be written taking into account the sum of the q previous errors and its own error, as presented in Equation (2), βi are the MA coefficients, αi and βi are estimated by Box and Jenkins methodology [26]. A combination of AR and MA gives the ARMA(p,q) model as described in Equation (3), The aim of this work is to accurately predict the solar radiation. This objective cannot be reached without performing an effective prediction strategy. Therefore, this study begins with an observation of the solar radiation database which is already treated and cleaned in the research work presented in [27]. It is solar radiation measurements that are taken for an industrial company located in Barcelona north [28]. These measurements are recorded for every day with a frequency of five minutes throughout a year. Data measurements are presented in Figure 1. The evolution of solar radiation during different days will be presented and treated in this section, the choice of these days is chosen according to different seasons. After that, the annual solar radiation curve will be refined, indeed, only the average of daily and weekly solar radiation will be respectively taken into account. Then, these solar radiation time series will be predicted by the ARMA model. According to the obtained results, the NARX model will be introduced to improve the accuracy of solar radiation prediction. Details will be presented and discussed in the form of four scenarios in the following section. The evolution of solar radiation during different days will be presented and treated in this section, the choice of these days is chosen according to different seasons. After that, the annual solar radiation curve will be refined, indeed, only the average of daily and weekly solar radiation will be respectively taken into account. Then, these solar radiation time series will be predicted by the ARMA model. According to the obtained results, the NARX model will be introduced to improve the accuracy of solar radiation prediction. Details will be presented and discussed in the form of four scenarios in the following section.

1st Scenario: Solar Radiation Prediction for a Winter Day
In this part, the solar radiation evolution corresponding to a winter day is studied. The studied day chosen is 2 January, its solar radiation evolution is described in Figure 2, it Energies 2021, 14, 6920 5 of 26 is low during the morning, then, it increases to reach a maximum value of 599 W/m 2 in the afternoon. From 2 pm, the radiation decreases, and it ends at 5 h 33 pm. In this part, the solar radiation evolution corresponding to a winter day is studied. The studied day chosen is 2 January, its solar radiation evolution is described in Figure 2, it is low during the morning, then, it increases to reach a maximum value of 599 W/m 2 in the afternoon. From 2 pm, the radiation decreases, and it ends at 5 h 33 pm. Being a stationary series is a prerequisite to apply the ARMA model. The Dickey-Fuller test can be used to study the series stationarity. Test results show the existence of a unit root which reflects the non-stationarity of the above series. The next step is the differentiation of this series to make it stationary. Figure 3 presents the evolution of solar radiation after performing the differentiation. The curve shows some heavy fluctuations in the morning and other lower one before the sunset. For the rest of the day, the solar radiation variation seems stable, it does not outstrip 15%. The Dickey-Fuller test proves the differentiated series stationarity; thus, it is possible in this step to apply the ARMA model. Its order and coefficients are obtained after following the Box and Jenkins methodology, they are presented in Table 1. Being a stationary series is a prerequisite to apply the ARMA model. The Dickey-Fuller test can be used to study the series stationarity. Test results show the existence of a unit root which reflects the non-stationarity of the above series. The next step is the differentiation of this series to make it stationary. Figure 3 presents the evolution of solar radiation after performing the differentiation. The curve shows some heavy fluctuations in the morning and other lower one before the sunset. For the rest of the day, the solar radiation variation seems stable, it does not outstrip 15%. In this part, the solar radiation evolution corresponding to a winter day is studied. The studied day chosen is 2 January, its solar radiation evolution is described in Figure 2, it is low during the morning, then, it increases to reach a maximum value of 599 W/m 2 in the afternoon. From 2 pm, the radiation decreases, and it ends at 5 h 33 pm. Being a stationary series is a prerequisite to apply the ARMA model. The Dickey-Fuller test can be used to study the series stationarity. Test results show the existence of a unit root which reflects the non-stationarity of the above series. The next step is the differentiation of this series to make it stationary. Figure 3 presents the evolution of solar radiation after performing the differentiation. The curve shows some heavy fluctuations in the morning and other lower one before the sunset. For the rest of the day, the solar radiation variation seems stable, it does not outstrip 15%. The Dickey-Fuller test proves the differentiated series stationarity; thus, it is possible in this step to apply the ARMA model. Its order and coefficients are obtained after following the Box and Jenkins methodology, they are presented in Table 1. The Dickey-Fuller test proves the differentiated series stationarity; thus, it is possible in this step to apply the ARMA model. Its order and coefficients are obtained after following the Box and Jenkins methodology, they are presented in Table 1.

ARMA (p,q)
Order Coefficients The real differentiated solar radiation curve and the predicted one by ARMA (3,3) are presented in Figure 4. There is an approximation between these two curves especially when the real solar radiation does not present great fluctuations. For other time intervals, the predicted radiation curve diverges from the real one. This is notably observed for significant solar radiation fluctuations.

ARMA (p,q) Order
Coefficients The real differentiated solar radiation curve and the predicted one by ARMA (3,3) are presented in Figure 4. There is an approximation between these two curves especially when the real solar radiation does not present great fluctuations. For other time intervals, the predicted radiation curve diverges from the real one. This is notably observed for significant solar radiation fluctuations. To assess the performances of the ARMA (3,3) model, error and relative error are calculated and presented in Figure 5. In addition, Mean Square Error (MSE), Mean Absolute Error (MAE), and Root Mean Square Error (RMSE) are estimated and presented in Table 2.  To assess the performances of the ARMA (3,3) model, error and relative error are calculated and presented in Figure 5. In addition, Mean Square Error (MSE), Mean Absolute Error (MAE), and Root Mean Square Error (RMSE) are estimated and presented in Table 2.

ARMA (p,q) Order
Coefficients The real differentiated solar radiation curve and the predicted one by ARMA (3,3) are presented in Figure 4. There is an approximation between these two curves especially when the real solar radiation does not present great fluctuations. For other time intervals, the predicted radiation curve diverges from the real one. This is notably observed for significant solar radiation fluctuations. To assess the performances of the ARMA (3,3) model, error and relative error are calculated and presented in Figure 5. In addition, Mean Square Error (MSE), Mean Absolute Error (MAE), and Root Mean Square Error (RMSE) are estimated and presented in Table 2.   As shown in the above table, MAE is the lowest error compared to MSE and RMSE. However, it is also considered important. This significant error can be explained by the large variation range of solar radiation presented in this day. Simulation results corresponding to this part are presented in Figure 6; where the predicted curve is compared with the real one (after differentiation). As shown in the above table, MAE is the lowest error compared to MSE and RMS However, it is also considered important. This significant error can be explained by t large variation range of solar radiation presented in this day. Simulation results corr sponding to this part are presented in Figure 6; where the predicted curve is compar with the real one (after differentiation). As presented in Figure 6, ARMA (3,3) allowed us to take back the two first solar r diation peaks which do not exceed 10%; however, it failed to predict the third peak whi is around 30%. Then, the predicted curve fully diverges from the real one. These resu show the weakness of the ARMA model to predict solar radiation over a winter day. Fi ure 7 presents the error and relative error of solar radiation prediction. Relative error around 1% in some periods of day, but it increases at other time intervals. MSE, MAE, an RMSE are calculated as presented in Table 3. Among these errors, MAE represents t smallest one, but this does not reflect the performances of ARMA (3,3). It is possible explain the inability of ARMA (3,3) to predict solar radiation for a winter day by two ma causes.

•
The first one is the order of model which is equal to 3, this means that the ARM model is able to forecast the three first solar radiation periods, which corresponds 15 min as the interval horizon.

•
The second cause is that, even in a very short term, the performance of the ARM (3,3) model deteriorates by the third data point. This can be explained by the lar solar radiation peak recorded at this time. As presented in Figure 6, ARMA (3,3) allowed us to take back the two first solar radiation peaks which do not exceed 10%; however, it failed to predict the third peak which is around 30%. Then, the predicted curve fully diverges from the real one. These results show the weakness of the ARMA model to predict solar radiation over a winter day. Figure 7 presents the error and relative error of solar radiation prediction. Relative error is around 1% in some periods of day, but it increases at other time intervals. MSE, MAE, and RMSE are calculated as presented in Table 3. Among these errors, MAE represents the smallest one, but this does not reflect the performances of ARMA (3,3). It is possible to explain the inability of ARMA (3,3) to predict solar radiation for a winter day by two main causes.

•
The first one is the order of model which is equal to 3, this means that the ARMA model is able to forecast the three first solar radiation periods, which corresponds to 15 min as the interval horizon.

•
The second cause is that, even in a very short term, the performance of the ARMA (3,3) model deteriorates by the third data point. This can be explained by the large solar radiation peak recorded at this time.

2nd Scenario: Solar Radiation Prediction for a Summer Day
In this section, the solar radiation evolution of a summer day is studied. The studied day corresponds to 15 July, it is chosen as an example to test the prediction of solar radiation for a summer day. Figure 8 presents the evolution of solar radiation for this day. It presents some fluctuations; its maximum value is 867 W/m 2 . The Dickey-Fuller test is applied and it indicates the non-stationarity of the series. The second step is the differentiation of this series in order to make it stationary (Figure 9). The Dickey-Fuller test is applied, it proves the differentiated series stationarity

2nd Scenario: Solar Radiation Prediction for a Summer Day
In this section, the solar radiation evolution of a summer day is studied. The studied day corresponds to 15 July, it is chosen as an example to test the prediction of solar radiation for a summer day. Figure 8 presents the evolution of solar radiation for this day. It presents some fluctuations; its maximum value is 867 W/m 2 . The Dickey-Fuller test is applied and it indicates the non-stationarity of the series.

2nd Scenario: Solar Radiation Prediction for a Summer Day
In this section, the solar radiation evolution of a summer day is studied. The studied day corresponds to 15 July, it is chosen as an example to test the prediction of solar radiation for a summer day. Figure 8 presents the evolution of solar radiation for this day. It presents some fluctuations; its maximum value is 867 W/m 2 . The Dickey-Fuller test is applied and it indicates the non-stationarity of the series. The second step is the differentiation of this series in order to make it stationary (Figure 9). The Dickey-Fuller test is applied, it proves the differentiated series stationarity The second step is the differentiation of this series in order to make it stationary ( Figure 9). The Dickey-Fuller test is applied, it proves the differentiated series stationarity [27]. Box and Jenkins steps are then followed to obtain the optimal parameters of the ARMA model. Table 4 presents respectively the parameters p and q and the coefficients α 1 , α 2 , α 3 , β 1 , β 2 , and β 3 .  [27]. Box and Jenkins steps are then followed to obtain the optimal parameters of the ARMA model. Table 4 presents respectively the parameters p and q and the coefficients α1, α2, α3, β1, β2, and β3.

ARMA (p,q) Orders
Coefficients The solar radiation corresponding to the summer day modeled by ARMA (3,3) as well as the real solar radiation curve are shown in Figure 10. The predicted one is close to the real solar radiation curve, it is less attenuated especially when the real solar radiation curve presents important peaks. It is also slightly delayed compared to the real solar radiation. The intense peaks of solar radiation were discussed in the first scenario which has shown the inability of ARMA model to restore the important fluctuations of solar radiation. In addition, the observed delay may be explained by the ARMA model response time which is slow. The solar radiation corresponding to the summer day modeled by ARMA (3,3) as well as the real solar radiation curve are shown in Figure 10. The predicted one is close to the real solar radiation curve, it is less attenuated especially when the real solar radiation curve presents important peaks. It is also slightly delayed compared to the real solar radiation. The intense peaks of solar radiation were discussed in the first scenario which has shown the inability of ARMA model to restore the important fluctuations of solar radiation. In addition, the observed delay may be explained by the ARMA model response time which is slow. In Figure 11, the prediction errors are presented. MSE, MAE, and RMSE are calculated and presented in Table 5. Figure 11 shows that the prediction error is quite large; it reaches a maximum value of 130%. MSE, MAE, and RMSE are also considered important. This study shows the ineffectiveness of ARMA (3,3) to forecast the solar radiation for a summer day. It is possible to explain the ARMA (3,3) model's weakness by the large fluctuations of solar radiation that characterize the studied day. In Figure 11, the prediction errors are presented. MSE, MAE, and RMSE are calculated and presented in Table 5. Figure 11 shows that the prediction error is quite large; it reaches a maximum value of 130%. MSE, MAE, and RMSE are also considered important. This study shows the ineffectiveness of ARMA (3,3) to forecast the solar radiation for a summer day. It is possible to explain the ARMA (3,3) model's weakness by the large fluctuations of solar radiation that characterize the studied day.
In Figure 11, the prediction errors are presented. MSE, MAE, and RMSE are calculated and presented in Table 5. Figure 11 shows that the prediction error is quite large; it reaches a maximum value of 130%. MSE, MAE, and RMSE are also considered important. This study shows the ineffectiveness of ARMA (3,3) to forecast the solar radiation for a summer day. It is possible to explain the ARMA (3,3) model's weakness by the large fluctuations of solar radiation that characterize the studied day.  In this section, the solar radiation is predicted using the same previous model and for the same summer day. Simulation results are shown in Figure 12. The blue curve reflects the real solar radiation evolution while the red curve represents the predicted one. The prediction curve follows the real solar radiation evolution for the first three data  In this section, the solar radiation is predicted using the same previous model and for the same summer day. Simulation results are shown in Figure 12. The blue curve reflects the real solar radiation evolution while the red curve represents the predicted one. The prediction curve follows the real solar radiation evolution for the first three data points, however, as presented in Figure 12, it cannot properly reconstitute the curve. The predicted solar radiation is lower than the real one. From the fourth data point, the predicted curve diverges from the real solar radiation curve to pivot all around 0. points, however, as presented in Figure 12, it cannot properly reconstitute the curve. The predicted solar radiation is lower than the real one. From the fourth data point, the predicted curve diverges from the real solar radiation curve to pivot all around 0. The prediction errors are shown in Figure 13 while MSE, MAE, and RMSE values are presented in Table 6. Following the obtained results, the effectiveness of the ARMA (3,3) model to predict solar radiation for the summer day is not confirmed. This can be explained by the large fluctuations that characterize the studied day, especially at the beginning of the day (Figure 9). The prediction errors are shown in Figure 13 while MSE, MAE, and RMSE values are presented in Table 6. Following the obtained results, the effectiveness of the ARMA (3,3) model to predict solar radiation for the summer day is not confirmed. This can be explained by the large fluctuations that characterize the studied day, especially at the beginning of the day (Figure 9). The prediction errors are shown in Figure 13 while MSE, MAE, and RMSE values are presented in Table 6. Following the obtained results, the effectiveness of the ARMA (3,3) model to predict solar radiation for the summer day is not confirmed. This can be explained by the large fluctuations that characterize the studied day, especially at the beginning of the day (Figure 9).    In this scenario, we discuss the solar radiation behavior along a year taking into account the daily radiation averages. The curve that describes this evolution is presented in Figure 14. It shows several fluctuations since it represents the solar radiation for different days in the year.

3rd Scenario: Solar Radiation Prediction One Year in Advance Considering the Daily Radiation Averages
In this scenario, we discuss the solar radiation behavior along a year taking into account the daily radiation averages. The curve that describes this evolution is presented in Figure 14. It shows several fluctuations since it represents the solar radiation for different days in the year. This series is then differentiated as presented in Figure 15. The Dickey-Fuller test proves its stationarity [27] and the ARMA model obtained is that of ARMA (4,4). Coefficients corresponding to this model are computed and presented in Table 7. This series is then differentiated as presented in Figure 15. The Dickey-Fuller test proves its stationarity [27] and the ARMA model obtained is that of ARMA (4,4). Coefficients corresponding to this model are computed and presented in Table 7. This series is then differentiated as presented in Figure 15. The Dickey-Fuller test proves its stationarity [27] and the ARMA model obtained is that of ARMA (4,4). Coefficients corresponding to this model are computed and presented in Table 7.

ARMA (p,q) Order
Coefficients p = 4 α1 = 0.0897; α2 = −0.1275; α3 = 0.0852; α4 = −0.8752   In this part, ARMA (4,4) is applied to predict the daily solar radiation averages. Simulation results are presented in Figure 16. The real solar radiation presents several peaks especially during the winter. In summer days, solar radiation is overall stable; some peaks are observed, and they are less intense than those presented during the winter days. MSE, MAE, and RMSE are shown in Table 8 and prediction errors are shown in Figure 17. Following this curve, the error increases when a sudden solar radiation variation is presented. In this part, ARMA (4,4) is applied to predict the daily solar radiation averages ulation results are presented in Figure 16. The real solar radiation presents several especially during the winter. In summer days, solar radiation is overall stable; some are observed, and they are less intense than those presented during the winter days. MAE, and RMSE are shown in Table 8 and prediction errors are shown in Figure 17 lowing this curve, the error increases when a sudden solar radiation variation is sented. Figure 16. Solar radiation evolution prediction using the ARMA (4,4) model (daily radiation averages). Figure 16. Solar radiation evolution prediction using the ARMA (4,4) model (daily radiation averages).   In a second step, solar radiation is predicted one year in advance with the ARMA (4,4) model. The prediction results are presented in Figure 18. There is not an important resemblance between the real and predicted curves. The prediction errors, presented in Figure 19, are quite important which confirms our observation. Consequently, the ARMA In a second step, solar radiation is predicted one year in advance with the ARMA (4,4) model. The prediction results are presented in Figure 18. There is not an important resemblance between the real and predicted curves. The prediction errors, presented in Figure 19, are quite important which confirms our observation. Consequently, the ARMA (4,4) performances for the prediction of solar radiation considering daily radiation averages are not proven. This result can be explained by the large solar radiation fluctuations especially at the first days of the year. Prediction errors are computed and presented in Table 9. MAE is small compared to RMSE and MSE, but it is also considered important.  Table 9. MAE is small compared to RMSE and MSE, but it is also considered important.  Table 9. Prediction errors of solar radiation using the ARMA (4,4) model.  Table 9. MAE is small compared to RMSE and MSE, but it is also considered important.  Table 9. Prediction errors of solar radiation using the ARMA (4,4) model. Figure 19. (a) Error and (b) relative error of the prediction of solar radiation using the ARMA (4,4) model. In this section, in order to further refine the annual solar radiation curve, only weekly radiation averages are taken into consideration as presented in Figure 20. The Dickey-Fuller test is applied first, it indicates the non-stationarity of the above series [27]. Therefore, the first difference is applied to stationarize it as presented in Figure  21. The Dickey-Fuller test shows the stationarity of the differentiated series [27]. After that, the Box and Jenkins methodology steps are performed to validate the ARMA (2,1) model. α1, α2, and β1 coefficients of this model are presented in Table 10.   The Dickey-Fuller test is applied first, it indicates the non-stationarity of the above series [27]. Therefore, the first difference is applied to stationarize it as presented in Figure 21. The Dickey-Fuller test shows the stationarity of the differentiated series [27]. After that, the Box and Jenkins methodology steps are performed to validate the ARMA (2,1) model. α 1 , α 2 , and β 1 coefficients of this model are presented in Table 10. The Dickey-Fuller test is applied first, it indicates the non-stationarity of the above series [27]. Therefore, the first difference is applied to stationarize it as presented in Figure  21. The Dickey-Fuller test shows the stationarity of the differentiated series [27]. After that, the Box and Jenkins methodology steps are performed to validate the ARMA (2,1) model. α1, α2, and β1 coefficients of this model are presented in Table 10.   Figure 21. Relative differentiation of annual solar radiation considering weekly radiation averages. Table 10. Order and coefficients of ARMA (2,1).

ARMA (p,q)
Order Coefficients The differentiated solar radiation predicted using ARMA (2,1) and the real solar radiation curve are presented in Figure 22. An approximation is observed between these two curves for some time intervals, especially when the real solar radiation does not present large fluctuations. For other times, the predicted solar radiation diverges from the real one. This is especially observed for the large solar radiation fluctuations. To approve these results, error and relative error are presented in Figure 23. The differentiated solar radiation predicted using ARMA (2,1) and the real solar diation curve are presented in Figure 22. An approximation is observed between th two curves for some time intervals, especially when the real solar radiation does not p sent large fluctuations. For other times, the predicted solar radiation diverges from real one. This is especially observed for the large solar radiation fluctuations. To appr these results, error and relative error are presented in Figure 23. As presented in Figure 23b, relative error is small, it does not exceed 15%. Two pe are observed. The first one is in the 16th week of the year and the second is in the 3 week. When we refer to the real solar radiation curve, we observe a sudden solar radiat variation at the end of these two weeks. Indeed, the 16th and 17th weeks correspond spectively to the last week of April and the first week of May. During this period, observe a considerable decrease of temperature which may be the main reason for The differentiated solar radiation predicted using ARMA (2,1) and the real solar radiation curve are presented in Figure 22. An approximation is observed between these two curves for some time intervals, especially when the real solar radiation does not present large fluctuations. For other times, the predicted solar radiation diverges from the real one. This is especially observed for the large solar radiation fluctuations. To approve these results, error and relative error are presented in Figure 23. As presented in Figure 23b, relative error is small, it does not exceed 15%. Two peaks are observed. The first one is in the 16th week of the year and the second is in the 36th week. When we refer to the real solar radiation curve, we observe a sudden solar radiation variation at the end of these two weeks. Indeed, the 16th and 17th weeks correspond respectively to the last week of April and the first week of May. During this period, we observe a considerable decrease of temperature which may be the main reason for the sudden decrease of solar radiation (Figure 24a). In addition, the 37th and 38th weeks cor- As presented in Figure 23b, relative error is small, it does not exceed 15%. Two peaks are observed. The first one is in the 16th week of the year and the second is in the 36th week. When we refer to the real solar radiation curve, we observe a sudden solar radiation variation at the end of these two weeks. Indeed, the 16th and 17th weeks correspond respectively to the last week of April and the first week of May. During this period, we observe a considerable decrease of temperature which may be the main reason for the sudden decrease of solar radiation (Figure 24a). In addition, the 37th and 38th weeks correspond to the first two weeks of September. During this period, we have also observed a sudden decrease of the temperature which considerably affects the solar radiation evolution (Figure 24b). Moreover, as the weekly solar radiation averages are considered in this study, it is normal to have these wide solar radiation variations especially in switching periods from one season to another. sudden decrease of the temperature which considerably affects the solar radiation evolution (Figure 24b). Moreover, as the weekly solar radiation averages are considered in this study, it is normal to have these wide solar radiation variations especially in switching periods from one season to another.  Table 11. MSE is the smallest one, it is equal to 0.2182. In this section, solar radiation is predicted with the same model, ARMA (2,1). Simulation results are presented in Figure 25. The predicted solar radiation curve follows the evolution of the real one for the first ten weeks, then it pivots around 0. The prediction errors are presented in Figure 26. For the first ten weeks, the error is small, then it increases to 34%. This shows that the ARMA (2,1) model can successfully reformulate the solar radiation curve for the first time and then it loses it. Therefore, the prediction error does not exceed 5% when the solar radiation fluctuations are not important (around 30%).  Table 11. MSE is the smallest one, it is equal to 0.2182. In this section, solar radiation is predicted with the same model, ARMA (2,1). Simulation results are presented in Figure 25. The predicted solar radiation curve follows the evolution of the real one for the first ten weeks, then it pivots around 0. The prediction errors are presented in Figure 26. For the first ten weeks, the error is small, then it increases to 34%. This shows that the ARMA (2,1) model can successfully reformulate the solar radiation curve for the first time and then it loses it. Therefore, the prediction error does not exceed 5% when the solar radiation fluctuations are not important (around 30%).  MAE, MSE, and RMSE are shown in Table 12. MSE has the lowest value, equal to 0.1668. It is small compared to errors obtained in the three previous scenarios. Based on these results, we retain this strategy in our study and follow the solar radiation evolution considering the weekly radiation averages. Moreover, in order to improve the solar radiation prediction accuracy, the NARX model will be used as a second predictor. Our objective is to exploit the performances of the NARX model to improve the previous solar radiation results.  MAE, MSE, and RMSE are shown in Table 12. MSE has the lowest value, equal to 0.1668. It is small compared to errors obtained in the three previous scenarios. Based on these results, we retain this strategy in our study and follow the solar radiation evolution considering the weekly radiation averages. Moreover, in order to improve the solar radiation prediction accuracy, the NARX model will be used as a second predictor. Our objective is to exploit the performances of the NARX model to improve the previous solar radiation results.

Solar Radiation Prediction Using the NARX Model
In the objective to improve the accuracy of solar radiation prediction, we propose a combination of two models, ARMA and one type of Dynamic Neural Network (DNN) called NARX (Nonlinear Auto Regressive models with eXogenous inputs). The NARX model is classified in the recurrent DNN, it represents a nonlinear autoregressive model with exogenous inputs. It contains a linear ARX model with two delay vectors, one for input and another for outputting previous values. The NARX model is based on recurring connections and multilayer perceptron. Its effectiveness to predict PV power and daily direct solar radiation has been proven in research works presented in [29,30]. NARX is also applied to the prediction of electricity price and air pollution [31][32][33]. Compared to some other neural networks, it is characterized by a fast convergence as well as a good learning and better generalization [34]. The prediction of PV power with the NARX model presented in [29] have shown higher performances than those obtained when using a static neural network. Furthermore, it has provided better prediction results compared to those of radial neural networks in research works presented in [35].
The NARX model defines the output as a function of its inputs and its past outputs as described in Equation (4) [36], y(t) = f y(t − 1), y(t − 2), . . . , y t − d y ; u(t − 1), u(t − 2), . . . , u(t − d u ) (4) where u i represents the exogenous data and y i are the NARX model outputs. d u and d y present, respectively, delay order of the inputs u i and the outputs y i . In this section, we will first study performances of the NARX model for the prediction of solar radiation. As shown in Equation (4), NARX is based on historical data and involves some exogenous data. As temperature has a great effect on solar radiation evolution, it is chosen as an exogenous data in this study. Thus, NARX inputs will be historical solar radiation and temperature as presented in Figure 27.
y t = f [y t − 1 , y t − 2 , … . , y t − d ; u t − 1 , u t − 2 , … , u t − d ] where ui represents the exogenous data and yi are the NARX model outputs. du and dy present, respectively, delay order of the inputs ui and the outputs yi. In this section, we will first study performances of the NARX model for the prediction of solar radiation. As shown in Equation (4), NARX is based on historical data and involves some exogenous data. As temperature has a great effect on solar radiation evolution, it is chosen as an exogenous data in this study. Thus, NARX inputs will be historical solar radiation and temperature as presented in Figure 27. The numbers of both hidden layer neurons of each layer must be chosen in way to obtain the best learning and generalization performances. Therefore, the network performances are treated, in this section, for different neural network architectures. As presented in Figure 28, historical solar radiation (R(t-1) and R(t-2)) and temperatures (T(t-1) and T(t-2)) correspond to the inputs of the NARX model. The predicted solar radiation at time t (R(t)) is its output. "Tansig" and "purelin" are respectively the transfer functions for hidden output layers. The numbers of both hidden layer neurons of each layer must be chosen in way to obtain the best learning and generalization performances. Therefore, the network performances are treated, in this section, for different neural network architectures. As presented in Figure 28, historical solar radiation (R(t-1) and R(t-2)) and temperatures (T(t-1) and T(t-2)) correspond to the inputs of the NARX model. The predicted solar radiation at time t (R(t)) is its output. "Tansig" and "purelin" are respectively the transfer functions for hidden output layers. Firstly, performances are studied with only one neuron in hidden layer. After that, the neurons number is increased and network performances are restudied using MSE as assessment metric. The optimal neural network structure corresponds to the one which presents the minimal MSE. Simulation results are presented in Table 13 and Figure 29. The optimal neural architecture is obtained with hidden layer containing seven neurons as presented in Figure 30.  Firstly, performances are studied with only one neuron in hidden layer. After that, the neurons number is increased and network performances are restudied using MSE as assessment metric. The optimal neural network structure corresponds to the one which presents the minimal MSE. Simulation results are presented in Table 13 and Figure 29. The optimal neural architecture is obtained with hidden layer containing seven neurons as presented in Figure 30.   After the choice of the optimal neural structure, solar radiation is predicted using the NARX model. Simulation results are presented in Figure 31. The blue and red curves correspond respectively to the real solar radiation and the predicted one. An approximation between these two curves is observed, they overlap especially when solar radiation fluctuations are not important. Compared to the ARMA model, an improvement of solar radiation prediction is mainly shown for the high fluctuations.  After the choice of the optimal neural structure, solar radiation is predicted using the NARX model. Simulation results are presented in Figure 31. The blue and red curves correspond respectively to the real solar radiation and the predicted one. An approximation between these two curves is observed, they overlap especially when solar radiation fluctuations are not important. Compared to the ARMA model, an improvement of solar radiation prediction is mainly shown for the high fluctuations. After the choice of the optimal neural structure, solar radiation is predicted using the NARX model. Simulation results are presented in Figure 31. The blue and red curves correspond respectively to the real solar radiation and the predicted one. An approximation between these two curves is observed, they overlap especially when solar radiation fluctuations are not important. Compared to the ARMA model, an improvement of solar radiation prediction is mainly shown for the high fluctuations. To properly assess the performances of the NARX model, prediction errors are presented in Figure 32. Relative error presents a maximum value of 18%. It is low compared to that obtained with the ARMA model (34%). This shows the improvement of the predic-  To properly assess the performances of the NARX model, prediction errors are presented in Figure 32. Relative error presents a maximum value of 18%. It is low compared to that obtained with the ARMA model (34%). This shows the improvement of the prediction accuracy when the NARX model is applied. MSE, RMSE, and MAE are calculated, as indicated in Table 14. MSE has the lowest value, and it is higher than that obtained using the ARMA model. Thus, in order to compare the performances of ARMA and NARX on solar radiation prediction, MSE, MAE, and RMSE using ARMA are recomputed after normalizing the solar radiation, they are shown in Table 14. The obtained results prove the effectiveness of the NARX model to predict weekly radiation averages. To properly assess the performances of the NARX model, prediction errors are presented in Figure 32. Relative error presents a maximum value of 18%. It is low compared to that obtained with the ARMA model (34%). This shows the improvement of the prediction accuracy when the NARX model is applied. MSE, RMSE, and MAE are calculated, as indicated in Table 14. MSE has the lowest value, and it is higher than that obtained using the ARMA model. Thus, in order to compare the performances of ARMA and NARX on solar radiation prediction, MSE, MAE, and RMSE using ARMA are recomputed after normalizing the solar radiation, they are shown in Table 14. The obtained results prove the effectiveness of the NARX model to predict weekly radiation averages.

Solar Radiation Prediction Using a Hybrid Model (ARMA and NARX)
After using ARMA and NARX separately, we are interested, in this last part, to combine these two models. The challenge in the use of hybrid models is always the choice of the selection criterion between the techniques to be combined [37]. In this work, our criterion is based on the balance between the model type and its performances in solar radiation prediction. Indeed, we have shown the capability of the ARMA model to predict the low solar radiation fluctuations. However, its performances are deteriorated for the important fluctuations. They appear generally at the moments of change in metrological conditions; especially when the temperature decreases or increases suddenly. Moreover, the ARMA model is characterized by its flexibility, its main advantage is that it requires only the historical data. Indeed, introducing other data such as temperature or any other weather parameter imposes the treatment and the cleaning of the dataset, which is a difficult phase that requires the use of different statistical and physical tools [27].
The NARX model improves the prediction accuracy of solar radiation especially during its large variation. The prediction error MSE is decreased slightly compared to that obtained with the ARMA model. NARX is characterized by a direct feedback from output to input data which improve its predictive power. Nevertheless, it has certain disadvantages such as: It is based on learning examples to accomplish tasks, so it needs a large dataset which includes many examples.
There is not a direct technique which permits determining the optimal neural structure of the network, it is performed empirically. On the one hand, this requires a considerable time to test different neural network architectures; on the other hand, the choice of a neural architecture does not necessarily reflect that this is the optimal one. In fact, during the learning phase the gradient can converge towards a local minimum and not to a global one. Moreover, the probability to converge to a local minimum increases with the complexity of the network (high number of parameters) [18].
Based on these analyses, we propose taking advantages of these two models (ARMA and NARX). As it is simple and flexible, the ARMA model is used as the basic prediction technique. For a significant solar radiation variation, whose ARMA performances are deteriorated, the NARX model is introduced.
The real solar radiation and those predicted by the ARMA and NARX models are presented in Figure 33. The prediction errors using each model are presented in Figure 34.  As observed in Figure 33, the ARMA model's performance decreases when there is a significant solar radiation fluctuation (more than 10%). Therefore, we propose the use of the ARMA model for low solar radiation fluctuations (less than 10%) and the NARX  As observed in Figure 33, the ARMA model's performance decreases when there is a significant solar radiation fluctuation (more than 10%). Therefore, we propose the use of the ARMA model for low solar radiation fluctuations (less than 10%) and the NARX As observed in Figure 33, the ARMA model's performance decreases when there is a significant solar radiation fluctuation (more than 10%). Therefore, we propose the use of the ARMA model for low solar radiation fluctuations (less than 10%) and the NARX model for important solar radiation fluctuations (more than 10%). The proposed approach is recapitulated in Figure 35. The predicted solar radiation using the proposed model (ARMA and NARX) is presented in Figure 36. The performance is assessed with the different errors indicated in Table 15.  The obtained MSE is lower than MAE and RMSE (around 3%) and lower than those obtained using the ARMA model alone. The predicted solar radiation using the proposed model (ARMA and NARX) is presented in Figure 36. The performance is assessed with the different errors indicated in Table 15. The predicted solar radiation using the proposed model (ARMA and NARX) is presented in Figure 36. The performance is assessed with the different errors indicated in Table 15.  The obtained MSE is lower than MAE and RMSE (around 3%) and lower than those obtained using the ARMA model alone.  The obtained MSE is lower than MAE and RMSE (around 3%) and lower than those obtained using the ARMA model alone.

Discussion
To prove the effectiveness of the proposed hybrid model (ARMA and NARX), the obtained results must be compared to those published by some other research studies. In [38] authors presented in their review a state of art about prediction of solar radiation using an Artificial Neural Network (ANN) in some countries in the world. The obtained prediction errors are disparate. In Spain, recorded MSE is in the order of 6%, in Saudi Arabia, it is around 4.49% and the maximum reached average error in India is 4.09%. ANNs were also used in Ajaccio to predict the solar radiation for two different inclination angles (45 • and 60 • ). MSE is equal to 5.28% for an inclination of 45% and 6.24% for an inclination of 60%. A hybrid model is thus proposed by Chaabane and Ben Ammar [39], it is composed of fuzzy inferences and ANN. This model is used to predict the short-term solar radiation in Tunisia. The prediction error computed in this work is the nRMSE, it does not exceed 10%. Other research works are carried out in [40] to predict solar radiation one day in advance. They studied three different types of days (cloudy, not cloudy, and partially cloudy). The prediction Mean Absolute Percentage Error (MAPE) computed is in the order of 1.4% for a not cloudy day, 3% for a cloudy day, and 6.6% for a partially cloudy day. In [41], a long short-term memory algorithm (LSTM) is proposed to predict the next day solar radiation in Korea. Input data used for this model are the outdoor air temperature, wind speed, sky cover, humidity, and precipitation. This model showed an RMSE of 18% in the predictive performance. In India, the prediction of monthly average global solar radiation was made in [42] by using two ANN models with four different algorithms and the best results were given by the Levenberg-Marquardt back propagation (LM) algorithm with a MAPE of 4.24%. The new hybrid model based on Wavelet Transform (WT) and Support Vector Machines (SVM) was proposed in [43] to predict the daily horizontal global solar radiation in Iran. The achieved results demonstrated that the proposed methodology outperforms some other techniques in terms of MAPE which is of 6.99%. An evolutionary algorithm named Cuckoo Search (CS) was combined with Optimally Pruned Extreme Learning Machine (OP-ELM) methodology to forecast the hourly solar radiation in six regions in the United States [44]. RMSE was used to assess the performances of this combined model. The obtained prediction results are not so satisfactory since the RMSE is around 62.5%.
All the different results are recapitulated in Table 16. Moreover, to evaluate the performances of the proposed model presented in this work, we consider the aforementioned research studies. The MSE obtained, which is around 3%, is low compared to those obtained in the different literature works as presented in Table 16. This shows the effectiveness of the hybrid model (ARMA and NARX) to predict solar radiation. However, it is insufficient to judge that it is the best predictor even if it presents good results. Indeed, some other factors greatly affect solar radiation prediction such as the geographic location and the climate, therefore, countries which are characterized by a moderate climate cannot be treated as those having a climate with rapid variations. For these countries, it is not obvious to have a good prediction precision. On the other hand, solar radiation prediction in countries which present an abundance of cloud occurrences is more difficult than those characterized by a clear sky.  [38] Saudi Arabia MSE = 4.49% ANN [38] India MSE = 4.09% ANN [38] Ajaccio (angle 45%) MSE = 5.28% ANN [38] Ajaccio (angle 60%) MSE = 6.24% Fuzzy inferences + ANN [39] Tunisia nRMSE = 10% LSTM [41] Korea RMSE = 18% ANN (LM algorithm) [42] India MAPE = 4.24% WT + SVM [43] Iran MAPE = 6.99% CS + OP-ELM [44] United States RMSE = 62.5% Proposed (ARMA + NARX) Spain MSE = 3%; MAE = 12%; RMSE = 18% Energies 2021, 14, 6920 24 of 26

Conclusions
In this paper, a novel hybrid model composed of ARMA and NARX was proposed to predict the weekly solar radiation averages. The proposed hybrid model has the following advantages over the existing solar radiance prediction models: I The choice of the selection criterion between the techniques to be combined is accurate. It is based on two main criteria, the first one is the model type which reflects the simplicity and flexibility of the model to be applied and the second one is based on its performance. I These models (ARMA and NARX), before combined, are applied separately and the capability of each model to predict the solar radiation is rigorously assessed in order to extract the performances of each one and benefit of them in a hybrid model. Therefore, since it is simple, flexible, and especially does not require additional and exogenous data to be applied, the ARMA model was used as the basic predictor of solar radiation in this work. Moreover, the effectiveness of ARMA to predict the weekly radiation averages has been proven for a solar radiation variation less than 10%, its performances are not satisfactory when a large solar radiation fluctuation is presented. Hence, the NARX model was used when the solar radiation exceeds 10%, it introduces the temperature and historical solar radiation as inputs. Performances of the proposed hybrid model are evaluated using MSE, MAE, and RMSE. The obtained results (MSE = 3%; MAE = 12%; RMSE = 18%) have shown better results compared to some different research works which reflects the effectiveness of the proposed model to predict the weekly solar radiation averages.
As a perspective, combining some other techniques and applying them to predict solar radiation in order to achieve better performances will be the subject of future works.