Dynamic Neural Network Model Design for Solar Radiation Forecast

Sunlight is an energy source that is a gift from God and is a source of life for living things, including humans as caliphs on earth. Judging from its impact, solar radiation is an environmental parameter that has positive and negative effects on human life. The pattern of distribution of solar radiation is important information for human life to be the attention of many people, both policymakers and researchers in the field of environment. This study objects to modeling the radiation of solar using a dynamic neural network (DNN) model. The data used in this research is the meteorological data of Mataram City for the period January 2018 to May 2019, which was obtained from the Department of Environment and Forestry of West Nusa Tenggara Province. In the development of this model, solar radiation was seen as a function of a combination of several variables related to meteorological (wind speed, wind direction, humidity, air pressure, and air temperature) and solar radiation data at some previous time. Considering the advantages and effectiveness of the activation function in the proposed DNN model learning process, this study's network learning in the hidden layer employed two activation functions: hyperbolic tangent (Type I) and hyperbolic tangent sigmoid functions (Type II). The output aggregation used two aggregates for each type: the weighted aggregation function (Type a) and the maximum function (Type b). The results of computer simulations based on the root of mean square error (RMSE) measure indicate that the model for modeling solar radiation in these two cases is quite accurate. Furthermore, it could be seen that the model's performance using the hyperbolic tangent activation function (Type b) is relatively better than the hyperbolic tangent sigmoid type of the activation function (Type a), with the RMSE values are 18.3924 and 18.4005, respectively.


Introduction
The last two years have been stressful times for human life on earth.The world community is busy with the appearance of the Covid-19 pandemic (Coronavirus diseases 2019), including Indonesia.Secondary problems related to the Covid-19 pandemic have also appealed to the concern of many sides: the government as regulators and scientists as researchers.Those issues include the model for the spread of the virus, strategies for preventing the development of the virus and the location of its spread, providing vaccines and the vaccination process, social, economic, educational, and social impact, so as culture and the problems that follow.
Humans have made various efforts to maintain and improve health and immunity, such as consuming various vitamins that can increase endurance and, at certain times, basking in the sun.According to [1], immunity is an important factor for survival and preventing diseases caused by infections, including Covid-19 infection.Immunity is especially important for children since the process of bone formation and increasing endurance needs vitamin D. When the skin is exposed to sunlight containing ultraviolet (UV) rays, this process will trigger the synthesis of vitamin D in the body.Furthermore, the kidneys and liver convert it into active vitamin D, which can be used by the body to improve calcium absorption and bone health.Someone who gets sun exposure of sufficient duration will be one of the causes of meeting the need for vitamin D, which impacts the immune system.A good immune system will maintain a healthy body, including fighting the coronavirus.On the other hand, if the human body is exposed to excessive sunlight, it will have negative effects such as sunburn, triggering signs of skin aging (skin loosening and stretching), and skin becoming rougher and drier.Direct exposure to sunlight can also increase the risk of skin cancer, damage eyes and hair color [2].
Based on the benefits and negative impacts caused by solar radiation, information and knowledge about the characteristics of daily solar radiation is a problem that must be studied and resolved.Mathematical modeling is a tool that can be used to identify and model the distribution pattern of solar radiation intensity.In this case, several studies on solar radiation intensity modeling techniques have been carried out, including modeling using statistics [3] and estimation methods [4].The modeling of solar radiation using air pressure parameters has been carried out by [5].The modeling uses a multi-layer perceptron-based neural network method by [6] and the wavelet neural network method [7].Modeling using the time series method with the fundamental of ARMA [8] and machine learning [9].Modeling using a non-linear time series basis has been carried out by [10].
Theoretically, the neural network model consists of two types: the statistic neural network model (static neural network or SNN) and the dynamic neural network model (dynamic neural network, DNN).The DNN model is a neural network model focusing on parameter changes over time.Based on these characteristics in modeling real problems, the use of the DNN model is more rational than the SNN model.Several studies related to the application of the DNN model include prediction of weather data [11], prediction of Zika virus risk [12], detection of seismic data anomalies [13], prediction of temperature at tube surface [14], segmentation and gesture recognition [15], and prediction of radio signal loss [16].
This study applied a dynamic neural network model (DNN) to model solar radiation using meteorological variables, namely wind speed, wind direction, humidity, air pressure, and air temperature as predictors.Besides meteorological variables, predictor variables were also used dynamically data on solar radiation some time in advance.DNN in this study was applied through the development of a DNN network architecture that utilizes the advantages and effectiveness of two types of activation functions, namely hyperbolic tangent and hyperbolic tangent sigmoid functions in the learning process in the hidden layer.Furthermore, for each type of activation function, the output aggregation process was distinguished again using the weighted aggregate function and the maximum function.

Research Methods
This study used a dynamic neural network (DNN) model to model solar radiation.The meteorological data in Mataram, Lombok, West Nusa Tenggara Province used were secondary, obtained from the Department of Environment and Forestry, West Nusa Tenggara Province, from January 2018 to May 2019.The meteorological data in question consisted of wind speed ( ) x and pressure ( ) x .
The study was carried out in four (4) main stages, namely: (i).The development of the model was started by studying the characteristics of solar radiation, one of the parameters of air pollution, as a response variable to several meteorological/weather variables.Meteorological variables were wind speed, direction, humidity, air temperature, and pressure.At this stage, the instrument used was correlation analysis, namely cross-correlation analysis between meteorological and solar radiation response variables.Furthermore, the effect of solar radiation data on several periods before t time was used for auto-correlation analysis.

Process of feed-forward DNN
The feed-forward process on the DNN model proposed in this study can be described based on the following stages: Layer 1: the input layer is divided into two input groups, namely the predictor input group in the form of the five meteorological variables mentioned, consisting of m1 data, and the input group data for solar radiation some time in advance consisting of m2 data.
Layer 2: the result of transforming the input data using the data normalization method with the following rules: The number of neurons in this layer was 2C neurons.
Layer 4: The weighted data of   ′ and   " for 1, 2, , jC = was activated using two types of functions, namely hyperbolic tangent function (tanh) and hyperbolic tangent sigmoid function (tansig), as follows: , and (3a) Layer 6: The final output of the model is given by the equation: Type a: ( ) for a real constant  and .

Optimization of learning parameters
Parameter optimization was carried out in the backward and forward steps of DNN.In this case, the optimized parameters included weight parameters of 1 W , 2 W , 3 W , and 4 W . Parameter optimization using the gradient descent with momentum method to minimize the objective function: ( ) N represents the amount of data, while The backward step optimization process was carried out using the following partial differential equations: LONTAR KOMPUTER VOL. 33 44 Furthermore, the weight improvement process used the following equation:

Numerical Results
This section gives the numerical results in modeling solar radiation as a dependent variable, ( ), yt with meteorological variables as independent variables, namely wind speed ( ) x , wind direction ( ) x , humidity ( ) x , air temperature ( )

,
x , and air pressure ( ) x .Besides meteorological data, to accommodate the influence of solar radiation data from time to time, input data is also provided by solar radiation data at previous times, which are analyzed using the autocorrelation method.The combination of these two input types was simultaneously used to model solar radiation as given by Equation ( 14) below: ( ) ( 1), ( 2), ( 4), ( 2), ( 4), ( 5), ( 2), .( 2), ( 1), ( 2), ( 3) The numerical simulation of the proposed model was divided into two types of activation functions in the hidden layer, namely using the hyperbolic tangent function (tanh) and the hyperbolic tangent sigmoid function (tansig) based on Equations (3a and 3b).Furthermore, each model was also simulated with two types of determining the output value, namely the weighted coefficient and the maximum function coefficient of weights, respectively, based on Equations ( 5) and ( 6).
The simulation modeling as in Equation ( 14) for 325 data used 280 training data and 45 testing data).

The model with hyperbolic tangent activation function (Type I)
The application of the DNN model with the architecture as visualized in Figure 1, with the activation function using a hyperbolic tangent function, and with the output value coefficient using weighted coefficients (Type I-a Model) gave the following results visualized in Figure 2    In the in-sample data, solar radiation on both models, Type I-a and Type I-b, are 0.7186 lower than the average actual data.Meanwhile, the DNN Type I-b model is 0.7513 lower than the actual data average.In the out-sample data, the mean given by the Type I-a Model and Type I-b Model is higher than the actual data.The average Type I-a model is 1.2823 higher, and the Type I-b model is 4.0858 higher than the actual data.Based on the average indicator, the Type I-a model is relatively preferable to the Type I-b model for both data (in-sample and out-sample).
Table 1     In the in-sample data, solar radiation on both models, Type II-a and Type II-b, have a lower average than the actual data.The average intensity of solar radiation given by the DNN Type IIa model is 0.6991 lower than the average actual data.Meanwhile, the DNN Type II-b model is 09594 lower than the average actual data.In the out-sample data, the mean given by the Type II-a Model and the Type II-b Model is higher than the actual data.The mean of the Type II-a Model of 2.8092 and Type II-b Model of 0.9776 is higher than the actual data.Based on the average indicator for the in-sample data, the Type II-a model is relatively better than the Type II-b model.
However, for the out-sample data, the Type II-b model is relatively preferable to the Type II-a model.Compared to [7] on the same data and subjects research, the comparison of model performance is presented in Table 3.The average and the RMSE indicators in Table 3 reveal that the DNN Model is relatively better than the WNN * Model in the training model.Furthermore, in the testing model, the DNN Model (Type II-a) average is somewhat better than the WNN * Model.However, based on the RMSE indicator, the performance of the WNN * Model is relatively better than the DNN Model developed in this study.Therefore, for further research, a hybrid model will be created between the DNN Model and the Wavelet Method to enhance the performance of the currently developed model.

Conclusion
The solar radiation modeling in this study is built upon the Dynamic Neural Network (DNN) Model.
The application of the DNN model to the solar radiation intensity model based on variables related to meteorology is simulated using two types of activation functions in the hidden layer, namely the hyperbolic tangent function (Type I Model) and hyperbolic tangent sigmoid (Type II Model).Each type is then distinguished again in determining the output value with a weighted coefficient (Type a) and a maximum coefficient (Type b).The RMSE indicator shows that the application of the DNN model in this study gave quite acceptable results, as seen in the graph pattern of the model output in comparison with the target data, particularly in the in-sample data.Based on the two cases of activation function applied, the DNN model using the hyperbolic tangent activation function is relatively better than the hyperbolic tangent sigmoid type of the activation function.

3 .
(ii).DNN architecture development, including: a. Determining the number of inputs, b.Determining the number of DNS layers, c.Determining the number of neurons (data) per layer, d.Developing the architectural model of the dynamic neural network model used in this study.(iii).Creating a computational program based on the DNN model in step ii.(iv).Numerical simulation using solar radiation actual data and several meteorological parameters in Mataram, Lombok Island, West Nusa Tenggara.p-ISSN 2088-1541 DOI : 10.24843/LKJITI.2022.v13.i02.p03e-ISSN 2541-5832 Accredited Sinta 2 by RISTEKDIKTI Decree No. 158/E/KPT/2021 98 Implementation of the DNN Model for Solar Radiation Modeling and Discussion 3.1.Proposed DNN architecture This study's proposed dynamic neural network (DNN) architecture is visualized below.

Figure 1 .
Figure 1.The proposed DNN architecture

5 :
In this layer, the activation result of summed again with the weights of   ,  = , , ⋯ ,  and  = , , ⋯ ,  using the following equation:

2
represents the output value of the proposed DNN model and the target data value.
stating the parameters of momentum, learning rate, and weight change of

Figure 2 .
Figure 2. Comparing the output of the DNN model (blue) and the actual data (red) of solar radiation chart pattern Type I-a based on meteorological variables

Figure 3 .
Figure 3. Comparing the output of the DNN model (blue) and the actual data (red) of the solar radiation chart pattern Type I-b based on meteorological variables Based on statistics, the following statistical measures gave the accuracy of the DNN model for modeling solar radiation built upon the impact of meteorological factors.

2 .
presents the application of the DNN Model to model solar radiation based upon meteorological variables.The performance of the DNN model using the activation function of the hyperbolic tangent function type coefficient of maximum output value (Type I-b Model) is relatively better than the use of weighted coefficients (Type Ia Model) both for in-sample data and outsample data.The root of mean square error (RMSE) values obtained for the DNN Type I-b model is 18.3924, while the DNN Type I-a model receives an accuracy of 18.6353.The model with hyperbolic tangent sigmoid activation function (Type II) Applying the DNN model with the activation function using a hyperbolic tangent sigmoid function with the output value coefficient using a weighted coefficient (Type II-a Model) gave a result as represented in Figure 4 below.

Figure 4 .
Figure 4. Comparing the DNN Model output (blue) and actual data (red) of solar radiation graphic patterns based on the meteorological variable of Type II-a DNN Model

Figure 5 .
Figure 5. Comparing the DNN Model output (blue) and actual data (red) of solar radiation graphic patterns based on meteorological variables of Type II-b DNN Model

Table 1 .
Comparison of data characteristics based on the type of weighted coefficient on the output value of the Type I DNN Model and its performance

Table 2 .
Comparison of data characteristics based on the type of maximum coefficient on the output value of the Type II DNN Model and its performance

Table 2
shows the application of the DNN model to model the solar radiation intensity based on meteorological variables.The performance of the Type II-a DNN model is relatively better than the Type II-b DNN model.The RMSE value of the Type II-a DNN Model is 18.4005, while the Type II-b DNN Model is 18.7382.Furthermore, Table1and Table2present the best results for accomplishing the DNN model based on the type of activation function in the hidden layer.The hyperbolic tangent activation function is relatively better than the activation function using the hyperbolic tangent sigmoid function in modeling the data.This can be seen from the performance of the model using RMSE, that the DNN model with activation function using a hyperbolic tangent (Type I Model) with an accuracy of 18.3924, namely the Type I-b DNN Model.Moreover, the DNN Model with the activation function using a hyperbolic tangent sigmoid (Type II DNN Model) has a high performance of 18.4005, namely the Type II-a Model.