# Predictive Model for Solar Insolation Using the Deep Learning Technique

Authors: Jiwon Park; Sung Hyup Hong; Sang Hun Yeon; Byeong Mo Seo; Kwang Ho Lee
Journal: International Journal of Energy Research
 (2023)

---

## Abstract

In this study, prediction performances of a regression model and deep learning-based predictive models were comparatively analyzed for the prediction of hourly insolation in regions located at the temperate climate and microthermal climate with high precipitation. Unlike linear regression models, artificial neural networks (ANN) and long short-term memory- (LSTM-) based models achieved reliable predictive performances with CV(RMSE) of 14.0% and 15.8%, respectively. This study proposed the direction of future research by improving the performance of predicting insolation at 1 hour after the current time-step, which has time-dependent characteristics, by utilizing insolation at 24 hours before the current time-step and insolation at the current time-step in addition to the forecasted weather data. In the proposed models, a large error occurred at sunrise and sunset times, suggesting the possibility of improving predictive performance by utilizing variables related to sunrise and sunset in the future. Along with Cheongju, the proposed model could properly predict the hourly insolation in other regions around the world. The results of predicting other regions derived slightly higher prediction errors than Cheongju. However, it is expected that it will be possible to predict the hourly insolation in other regions with better prediction performance if variables related to geographical location are additionally considered in the future.


---

## Body

## 1. Introduction

### 1.1. Research Background

Worldwide, many people are paying close attention to climate change caused by greenhouse gas emissions. As of October 2021, 55 countries have declared, documented, or legislated carbon neutrality with a clear target year [1]. Since approximately 76% of greenhouse gas emissions are generated during energy consumption [2], energy consumption must be reduced, and existing fossil fuels that require combustion processes must be replaced by other energy sources, to reduce greenhouse gas emissions.Since the energy consumed in buildings is nearly 40% of the total energy use [3], reducing the energy used in buildings can significantly reduce the total energy use. Therefore, high-efficiency systems for buildings are being developed to reduce energy consumed and renewable energy systems that can produce energy on-site. As a result, the concept of smart cities emerges, which optimizes the overall city energy system and enables the city to be energy independent. Smart cities are closely connected to the net-zero-energy building that self-produces energy from renewable energy sources, away from the existing method of receiving energy through fossil fuels. Each country has established various policies related to zero-energy buildings that are optimized for energy production and consumption in buildings [4–7].In order to realize net-zero-energy building, it is essential to reduce energy use and optimize energy usage efficiency. Accordingly, the need for a building management system (BMS) emerged [8]. The BMS includes the building automation system (BAS), which monitors the status of facilities and automatically controls the operation, and the energy management system (EMS), which provides optimized energy management measures while maintaining a comfortable indoor environment. Using EMS can save about 16% of the annual energy used in buildings [8]. Several preconditions must precede to operate the EMS stably. The critical point is that the EMS has to predict the amount of energy consumption and production to operate energy as necessary [9]. Furthermore, that energy production and consumption prediction can stabilize the operation of the energy grid of the district unit and city [10]. For this reason, many attempts have been made to predict renewable energy production through various data. For example, Balali et al. predicted solar and wind power generation through variables that indirectly affect power generation, such as the human development index [11].Among various renewable energies, power generation in a building is performed by solar thermal, photovoltaic, geothermal, wind, and fuel cells that can be applied to the building in consideration of the size and system of such power generation facilities. The total amount of renewable energy generation worldwide is 3,063,926 MW, and the most actively applied photovoltaic power generation and solar thermal collection are close to 849,473 MW, which is about 28% of overall renewable energy generation [12]. Solar insolation greatly influences solar power generation and solar heat collection. Since the amount of insolation reaching the ground varies significantly due to sudden changes in weather [13] and particle matters in the atmosphere [14], accurate insolation prediction must precede predicting the amount of photovoltaic power generation and solar thermal collection [15]. To predict building power consumption, it is also necessary to accurately predict insolation [16].Insolation refers to the total amount of solar radiation reached over a certain period, and thus, it is affected by all the processes it takes to reach the Earth, which makes predicting solar radiation very difficult. Various attempts have been made to develop predictive models of high reliability. The existing prediction models might be classified into physical and statistical models [17]. The physical model is a method of predicting insolation by analyzing actual physical elements such as weather observation information and includes a method of utilizing sky image and a method of using satellite images [18]. The representative physical models include the ASHRAE (American Society of Heating, Refrigerating and Air-Conditioning Engineers) model and Ahmad and Tiwari model [19]. Ahmad and Tiwari analyzed the solar radiation prediction performance of 50 physical models based on Konya region data. The model that derived the best performance uses nine input variables. The variables are the extraterrestrial radiation, solar declination, relative humidity, ratio of sunshine duration, mean air temperature, soil temperature, cloudiness, precipitation, and evaporation [20].The statistical model is a model that statistically analyzes the correlation between past weather variables and insolation to predict insolation as a weather variable at a future time [17]. Recently, machine learning techniques such as support vector machine (SVM) and random forest (RF) and artificial intelligence such as artificial neural networks (ANN) and convolutional neural network (CNN) have been most frequently used [21]. In this circumstance, due to the importance and complexity of the accurate prediction of insolation for heating and cooling energy saving in buildings, a variety of studies have been conducted thus far focusing on solar insolation prediction.


### 1.2. Literature Review

As mentioned above, numerous structured AI-based models have been conducted recently due to the tendency for high prediction performance. Most research utilizes weather data to reflect the sky condition on insolation prediction. Hwang et al. predicted the daily insolation by building rain forest, a generalization acceleration model, and extreme gradient boost (XG Boost) model using weather data and air pollutant data. In this research, the prediction performance of the optimum model is 0.979 ofR-square [22]. Ekici constructed a least squares support vector machine (LS-SVM) model to predict the daily insolation using weather data. This research conducted 0.094% of the coefficient of variation of the root mean square error (CV(RMSE)) in daily prediction [23]. Kumari and Toshniwal constructed an extreme gradient boosting forest-deep neural network (XGBF-DNN) model based on weather data to predict daily insolation. In this research, developed models had reduced prediction accuracy during the monsoon. The optimal prediction model has a prediction performance of 51.35 W/m2 of root mean square error (RMSE) [24]. Chung constructed an ANN-based model based on weather data to predict daily insolation [25]. Husein and Chung constructed a long short-term memory (LSTM) model to predict daily insolation based on weather data [26]. To improve the accuracy of the daily insolation prediction model, many researchers tried to reflect accurate sky condition to the model.Due to the time series characteristics of solar insolation, several researchers utilize previous insolation data to reflect a short-term meteorological trend. Diez et al. predicted daily insolation by a designated ANN model based on insolation for the past three days. The model that showed the best prediction performance was the model that utilized the amount of insolation and the date of the previous day only [27]. Behrang et al. constructed a multilayer perceptron (MLP) and radial basis function (RBF) models based on weather data and historical insolation data [28]. Cheng et al. constructed a convolutional LSTM model based on weather data and previous insolation data to predict daily insolation. The studies predicted daily insolation by developing an artificial intelligence- (AI-) based prediction model using various weather data and previous insolation data [29].The meteorological data, measured by a set time-step, includes information about weather changes. Therefore, with the nearly real-time records, the tendency of data could certainly explain the sudden weather change. However, daily meteorological data is measured or generated by summation of 24 hourly data. Because of the tendency variation induced by sudden weather change to vanish during this process, the daily data have the essential disadvantage of predicting sudden weather change. Consequently, the daily prediction models are not sufficient for utilization in EMS.Numerous researches on hourly prediction have been presented due to the limitation of applying daily prediction data to EMS. Solmaz and Ozgoren developed an ANN model based on location data and average dry-bulb temperature to predict the hourly insolation. In this study, it was concluded that the ratio of dividing the data set affects the prediction performance [30]. Kuk Yeol et al. predicted hourly insolation by developing a SVM-based model using weather data. In this study, the SVM was derived from having higher predictive performance on the day of weather change than on nonlinear autoregressive (NAR) or ANN-based models [31]. Pang et al. constructed ANN and recurrent neural network (RNN) models based on weather data to predict hourly insolation. In this study, all cases proved that RNN-based models showed higher performance than ANN-based models and that the application of moving window further improved prediction performance [32]. Ji and Chee predicted hourly insolation by developing a model that combines autoregressive moving average (ARMA) and time delay neural network (TDNN). In this study, the RMSE of the hybrid model for every two-day time-step is in the range of about 25 to 270 Wh/m2 [33]. This study confirmed that the higher the daily insolation, the lower the error rate. Voyant et al. predicted hourly insolation by designing a model that utilizes ANN and ARMA based on weather data measured in the Mediterranean climate. In this study, the proposed model did not significantly improve the predictive performance of the baseline ANN model. The overall average of NRMSE (normalized root mean square error) for optimum model is 16.3% [34]. Bamisile et al. predicted hourly global solar radiation (GSR) and diffused solar radiation (DSR) through models based on machine learning and deep learning algorithms. This study found that deep learning is more suitable than machine learning for GSR and DSR prediction. The best models had the following predictive performance: root mean square error (RMSE) of 82.22 W/m2 and mean absolute error (MAE) of 36.52 W/m2 [35].Diverse prediction models that consider the time series feature have been developed to precisely predict the hourly insolation. Although with the great effort recently, the effect on improving prediction performance is limited. Some of the research with high prediction performance often used data from regions with a clear distinction between dry and humid seasons. Other researchers with high performance used data from regions where the climate was consistent throughout the year with little sudden change in weather conditions.Recently, diverse LSTM-structured models have been presented due to the benefits induced by the structural characteristics of LSTM in processing time series data. Kim et al. predicted the hourly insolation by constructing a LSTM model based on weather data by CV(RMSE) of 26.87% [36], and Jeon et al. built an LSTM model using cloudiness and the previous day’s insolation data. In this study, the LSTM model derived a high prediction performance only with other regions’ insolation data and the previous day’s insolation pattern [37]. Obiora et al. constructed a model of LSTM structure based on weather data to predict the hourly insolation and compared it with SVM-based models. This study’s model of the LSTM structure derived a significantly higher prediction rate than other existing methods [38]. Qing and Niu constructed an LSTM model based on weather forecast data to predict the hourly insolation. Compared to other structures, the result was that LSTM showed higher predictive performance with less probability of overfitting. In this study, weather forecast data were used, so there was a limitation that the accuracy of predicting insolation significantly changed depending on the accuracy of the weather forecast [39].In previous studies, insolation prediction models were constructed with various structures. However, in the daily prediction model, the prediction cycle was longer than an hour, making it difficult to be used in the EMS that receives real-time information for optimal control. In addition, most studies predicting hourly solar radiation tended to find it difficult to detect changes in solar radiation. On the hourly prediction, LSTM-structured models have become a general trend recently. However, most studies have been challenging to apply in practice or examine the model’s characteristics to provide a background for further research. In some studies, a wide variety of data that needed additional estimation devices were used as input parameters. In some studies, the subject of study was only a short period when the sun was always up during the year. In some studies, only data from nonrainy periods were the subject of the study. We tried to do research that could be the basis for further research and could be applied immediately in practice. Therefore, we minimized the arbitrary data processing stage with only common weather data provided by the National Meteorological Agency and calculated solar location value. For this reason, we used the whole 365-day and 24-hour data to construct the model.The studies on temperate or microthermal climates with high summer precipitation and distinct seasons were insufficient. Therefore, we aimed to be a fundamental background for further research and facilitation in these climates. Therefore, in this study, the ANN- and LSTM-based models are developed to accurately predict changes in insolation due to sudden weather changes based on weather data in Cheongju, Republic of Korea, located on the boundary between the temperate climate and the microthermal climate.


## 1.1. Research Background

Worldwide, many people are paying close attention to climate change caused by greenhouse gas emissions. As of October 2021, 55 countries have declared, documented, or legislated carbon neutrality with a clear target year [1]. Since approximately 76% of greenhouse gas emissions are generated during energy consumption [2], energy consumption must be reduced, and existing fossil fuels that require combustion processes must be replaced by other energy sources, to reduce greenhouse gas emissions.Since the energy consumed in buildings is nearly 40% of the total energy use [3], reducing the energy used in buildings can significantly reduce the total energy use. Therefore, high-efficiency systems for buildings are being developed to reduce energy consumed and renewable energy systems that can produce energy on-site. As a result, the concept of smart cities emerges, which optimizes the overall city energy system and enables the city to be energy independent. Smart cities are closely connected to the net-zero-energy building that self-produces energy from renewable energy sources, away from the existing method of receiving energy through fossil fuels. Each country has established various policies related to zero-energy buildings that are optimized for energy production and consumption in buildings [4–7].In order to realize net-zero-energy building, it is essential to reduce energy use and optimize energy usage efficiency. Accordingly, the need for a building management system (BMS) emerged [8]. The BMS includes the building automation system (BAS), which monitors the status of facilities and automatically controls the operation, and the energy management system (EMS), which provides optimized energy management measures while maintaining a comfortable indoor environment. Using EMS can save about 16% of the annual energy used in buildings [8]. Several preconditions must precede to operate the EMS stably. The critical point is that the EMS has to predict the amount of energy consumption and production to operate energy as necessary [9]. Furthermore, that energy production and consumption prediction can stabilize the operation of the energy grid of the district unit and city [10]. For this reason, many attempts have been made to predict renewable energy production through various data. For example, Balali et al. predicted solar and wind power generation through variables that indirectly affect power generation, such as the human development index [11].Among various renewable energies, power generation in a building is performed by solar thermal, photovoltaic, geothermal, wind, and fuel cells that can be applied to the building in consideration of the size and system of such power generation facilities. The total amount of renewable energy generation worldwide is 3,063,926 MW, and the most actively applied photovoltaic power generation and solar thermal collection are close to 849,473 MW, which is about 28% of overall renewable energy generation [12]. Solar insolation greatly influences solar power generation and solar heat collection. Since the amount of insolation reaching the ground varies significantly due to sudden changes in weather [13] and particle matters in the atmosphere [14], accurate insolation prediction must precede predicting the amount of photovoltaic power generation and solar thermal collection [15]. To predict building power consumption, it is also necessary to accurately predict insolation [16].Insolation refers to the total amount of solar radiation reached over a certain period, and thus, it is affected by all the processes it takes to reach the Earth, which makes predicting solar radiation very difficult. Various attempts have been made to develop predictive models of high reliability. The existing prediction models might be classified into physical and statistical models [17]. The physical model is a method of predicting insolation by analyzing actual physical elements such as weather observation information and includes a method of utilizing sky image and a method of using satellite images [18]. The representative physical models include the ASHRAE (American Society of Heating, Refrigerating and Air-Conditioning Engineers) model and Ahmad and Tiwari model [19]. Ahmad and Tiwari analyzed the solar radiation prediction performance of 50 physical models based on Konya region data. The model that derived the best performance uses nine input variables. The variables are the extraterrestrial radiation, solar declination, relative humidity, ratio of sunshine duration, mean air temperature, soil temperature, cloudiness, precipitation, and evaporation [20].The statistical model is a model that statistically analyzes the correlation between past weather variables and insolation to predict insolation as a weather variable at a future time [17]. Recently, machine learning techniques such as support vector machine (SVM) and random forest (RF) and artificial intelligence such as artificial neural networks (ANN) and convolutional neural network (CNN) have been most frequently used [21]. In this circumstance, due to the importance and complexity of the accurate prediction of insolation for heating and cooling energy saving in buildings, a variety of studies have been conducted thus far focusing on solar insolation prediction.


## 1.2. Literature Review

As mentioned above, numerous structured AI-based models have been conducted recently due to the tendency for high prediction performance. Most research utilizes weather data to reflect the sky condition on insolation prediction. Hwang et al. predicted the daily insolation by building rain forest, a generalization acceleration model, and extreme gradient boost (XG Boost) model using weather data and air pollutant data. In this research, the prediction performance of the optimum model is 0.979 ofR-square [22]. Ekici constructed a least squares support vector machine (LS-SVM) model to predict the daily insolation using weather data. This research conducted 0.094% of the coefficient of variation of the root mean square error (CV(RMSE)) in daily prediction [23]. Kumari and Toshniwal constructed an extreme gradient boosting forest-deep neural network (XGBF-DNN) model based on weather data to predict daily insolation. In this research, developed models had reduced prediction accuracy during the monsoon. The optimal prediction model has a prediction performance of 51.35 W/m2 of root mean square error (RMSE) [24]. Chung constructed an ANN-based model based on weather data to predict daily insolation [25]. Husein and Chung constructed a long short-term memory (LSTM) model to predict daily insolation based on weather data [26]. To improve the accuracy of the daily insolation prediction model, many researchers tried to reflect accurate sky condition to the model.Due to the time series characteristics of solar insolation, several researchers utilize previous insolation data to reflect a short-term meteorological trend. Diez et al. predicted daily insolation by a designated ANN model based on insolation for the past three days. The model that showed the best prediction performance was the model that utilized the amount of insolation and the date of the previous day only [27]. Behrang et al. constructed a multilayer perceptron (MLP) and radial basis function (RBF) models based on weather data and historical insolation data [28]. Cheng et al. constructed a convolutional LSTM model based on weather data and previous insolation data to predict daily insolation. The studies predicted daily insolation by developing an artificial intelligence- (AI-) based prediction model using various weather data and previous insolation data [29].The meteorological data, measured by a set time-step, includes information about weather changes. Therefore, with the nearly real-time records, the tendency of data could certainly explain the sudden weather change. However, daily meteorological data is measured or generated by summation of 24 hourly data. Because of the tendency variation induced by sudden weather change to vanish during this process, the daily data have the essential disadvantage of predicting sudden weather change. Consequently, the daily prediction models are not sufficient for utilization in EMS.Numerous researches on hourly prediction have been presented due to the limitation of applying daily prediction data to EMS. Solmaz and Ozgoren developed an ANN model based on location data and average dry-bulb temperature to predict the hourly insolation. In this study, it was concluded that the ratio of dividing the data set affects the prediction performance [30]. Kuk Yeol et al. predicted hourly insolation by developing a SVM-based model using weather data. In this study, the SVM was derived from having higher predictive performance on the day of weather change than on nonlinear autoregressive (NAR) or ANN-based models [31]. Pang et al. constructed ANN and recurrent neural network (RNN) models based on weather data to predict hourly insolation. In this study, all cases proved that RNN-based models showed higher performance than ANN-based models and that the application of moving window further improved prediction performance [32]. Ji and Chee predicted hourly insolation by developing a model that combines autoregressive moving average (ARMA) and time delay neural network (TDNN). In this study, the RMSE of the hybrid model for every two-day time-step is in the range of about 25 to 270 Wh/m2 [33]. This study confirmed that the higher the daily insolation, the lower the error rate. Voyant et al. predicted hourly insolation by designing a model that utilizes ANN and ARMA based on weather data measured in the Mediterranean climate. In this study, the proposed model did not significantly improve the predictive performance of the baseline ANN model. The overall average of NRMSE (normalized root mean square error) for optimum model is 16.3% [34]. Bamisile et al. predicted hourly global solar radiation (GSR) and diffused solar radiation (DSR) through models based on machine learning and deep learning algorithms. This study found that deep learning is more suitable than machine learning for GSR and DSR prediction. The best models had the following predictive performance: root mean square error (RMSE) of 82.22 W/m2 and mean absolute error (MAE) of 36.52 W/m2 [35].Diverse prediction models that consider the time series feature have been developed to precisely predict the hourly insolation. Although with the great effort recently, the effect on improving prediction performance is limited. Some of the research with high prediction performance often used data from regions with a clear distinction between dry and humid seasons. Other researchers with high performance used data from regions where the climate was consistent throughout the year with little sudden change in weather conditions.Recently, diverse LSTM-structured models have been presented due to the benefits induced by the structural characteristics of LSTM in processing time series data. Kim et al. predicted the hourly insolation by constructing a LSTM model based on weather data by CV(RMSE) of 26.87% [36], and Jeon et al. built an LSTM model using cloudiness and the previous day’s insolation data. In this study, the LSTM model derived a high prediction performance only with other regions’ insolation data and the previous day’s insolation pattern [37]. Obiora et al. constructed a model of LSTM structure based on weather data to predict the hourly insolation and compared it with SVM-based models. This study’s model of the LSTM structure derived a significantly higher prediction rate than other existing methods [38]. Qing and Niu constructed an LSTM model based on weather forecast data to predict the hourly insolation. Compared to other structures, the result was that LSTM showed higher predictive performance with less probability of overfitting. In this study, weather forecast data were used, so there was a limitation that the accuracy of predicting insolation significantly changed depending on the accuracy of the weather forecast [39].In previous studies, insolation prediction models were constructed with various structures. However, in the daily prediction model, the prediction cycle was longer than an hour, making it difficult to be used in the EMS that receives real-time information for optimal control. In addition, most studies predicting hourly solar radiation tended to find it difficult to detect changes in solar radiation. On the hourly prediction, LSTM-structured models have become a general trend recently. However, most studies have been challenging to apply in practice or examine the model’s characteristics to provide a background for further research. In some studies, a wide variety of data that needed additional estimation devices were used as input parameters. In some studies, the subject of study was only a short period when the sun was always up during the year. In some studies, only data from nonrainy periods were the subject of the study. We tried to do research that could be the basis for further research and could be applied immediately in practice. Therefore, we minimized the arbitrary data processing stage with only common weather data provided by the National Meteorological Agency and calculated solar location value. For this reason, we used the whole 365-day and 24-hour data to construct the model.The studies on temperate or microthermal climates with high summer precipitation and distinct seasons were insufficient. Therefore, we aimed to be a fundamental background for further research and facilitation in these climates. Therefore, in this study, the ANN- and LSTM-based models are developed to accurately predict changes in insolation due to sudden weather changes based on weather data in Cheongju, Republic of Korea, located on the boundary between the temperate climate and the microthermal climate.


## 2. Overview of Predictive Models and Their Performance Evaluation Metrics

### 2.1. Artificial Neural Networks

Artificial neural networks (ANNs) are the statistical learning algorithms inspired by a neural network in biology. ANN-based model refers to the structure of a model in which artificial neurons that form networks by synaptic combinations repeatedly learn, changing the strength of the combination, and thus have problem-solving capabilities. The structure of ANN is shown in Figure1. ANN consists of an input layer, hidden layer, and output Layer, and the input value is processed into various calculations and presented as a result value. ANN calculates each value of the input layer or the result value of the immediately preceding layer with each weighting factor and then derives the output through the activation function operation. The derived output is used again for the calculation of the next layer [40].Figure 1
Structure of ANN. (a) ANN model consisted with input, hidden, and output layers. The input data propagate to the output layer progressively. (b) In the neuron, propagated data is transformed with designated activation function.
(a)
Overall structure of conventional ANN model(b)
Interior structure of ANN hidden neuronANN produces robust results for several noises or incomplete data and has the advantage of being able to perform well in complex models [41] but has the disadvantages of passing through the hidden layer and transferring initial input data in a transformed state and vanishing gradients in finding the optimal value of parameters [42].


### 2.2. Recurrent Neural Networks

Recurrent neural networks (RNNs) are artificial neural networks that can utilize inference about past events due to the loop of delivering data and the loop of keeping initial input data intact. The RNN has the advantage of considering the context of the previous time-step when computing the current time-step. Due to this advantage, it is advantageous for repetitive and sequential time series data processing. However, like ANN, it has the disadvantage that Vanishing Gradient occurs in the process of finding the optimal value of parameters.Therefore, the longer the time-step of the data leads to the long-term dependency problem, making it challenging to connect information and complex to utilize the context of the previous data [43].


### 2.3. Long Short-Term Memory

Long short-term memory (LSTM) is a type of RNN. The structure of the LSTM is shown in Figure2. Unlike standard RNN, which has only one activation function in the loop, keeping the initial input data intact, LSTM contains multiple activation functions and operations within four interactive layers. In an LSTM structure, the section through which information is selectively passed is called “Gate”, and the path through which the information flows in a straight line along the entire LSTM cell is called “Cell State”. Each gate is composed of functions such as sigmoid and tanh and calculations [43].Figure 2
Structure of LSTM. (a) LSTM model consisted with diverse cells which sequentially aligned. (b) In the cell, there are four steps (forget gate, input gate, cell state, and output gate) to propagate data to the next cell. Each of the four steps has extinct role.
(a)
Overall structure of conventional LSTM model(b)
Interior structure of LSTM cellThe first layer of LSTM is the forget gate, which receives the input valuext of the current time-step and the output value ht−1 of the previous time-step and determines information to be discarded through the sigmoid operation. The second layer is the input gate, which receives the input value xt of the current time-step and the output value ht−1 of the previous time-step and determines what information to store through the sigmoid and tanh operations. The third layer is a layer that updates the cell state output value Ct−1 of the previous time-step to the cell state Ct of the current time-step, and the fourth layer is a layer that determines information to be output based on the cell state Ct of the current time-step [43].LSTM is designed to solve the long-term dependency problem of RNNs [44]. As mentioned, it aims to derive more accurate output values by properly combining appropriate historical and current information through multiple layers. As LSTM is a type of RNN, it is beneficial for models that use time series data, and when the length of the input data is very long, it usually derives higher predictive performance than RNN [43].


### 2.4. Performance Evaluation Metrics

In this study, mean absolute error (MAE), coefficient of variation of the root mean square error (CV(RMSE)), and normalized mean bias error (NMBE) are used as performance evaluation metrics to analyze the prediction performance of developed models. The low MAE and CV(RMSE), the low absolute value of NMBE, and highR2 mean the difference between measured and prediction value is low, indicating the high prediction performance. For the equation of each performance evaluation metric, yk means the kth measured value and yk^ means the kth prediction value.
(1)
MAE is an intuitive indicator of the magnitude of the mean error, which utilizes the absolute value of the difference between predicted and measured values [45].(1)MAE=∑k=1nyk−yk^n(2)
CV(RMSE) is the performance indicator that utilizes the proportion of square root of square value of the difference between predicted and measured values. According to the ASHRAE Guideline 14, the hourly prediction model has effectiveness with less than 30% of CV(RMSE) [46, 47].(2)CVRMSE=∑k=1nyk−yk∧2/n∑k=1nyk/n∗100%(3)
NMBE is the performance indicator that utilizes the proportion of summation of the difference between predicted and measured values. According to the ASHRAE Guideline 14, the hourly prediction model has effectiveness with the range between -10% and 10% of the NMBE [45, 46].(3)NMBE=∑k=1nyk−yk^∑k=1nyk∗100%(4)
R-square (R2) is the performance indicator that explains the degree of suitability of the prediction model to the measured value. Therefore, it shows the distance between the regression line of the measured line and the prediction value. R-square ranges between 0 and 1, and the closer it is to 1, the higher the prediction performance. According to the ASHRAE Handbook, R-square higher than 0.75 has effectiveness [48, 49].(4)R2=1−∑k=1nyk∧−yk2∑k=1n∑k=1nyk/n−yk2


## 2.1. Artificial Neural Networks

Artificial neural networks (ANNs) are the statistical learning algorithms inspired by a neural network in biology. ANN-based model refers to the structure of a model in which artificial neurons that form networks by synaptic combinations repeatedly learn, changing the strength of the combination, and thus have problem-solving capabilities. The structure of ANN is shown in Figure1. ANN consists of an input layer, hidden layer, and output Layer, and the input value is processed into various calculations and presented as a result value. ANN calculates each value of the input layer or the result value of the immediately preceding layer with each weighting factor and then derives the output through the activation function operation. The derived output is used again for the calculation of the next layer [40].Figure 1
Structure of ANN. (a) ANN model consisted with input, hidden, and output layers. The input data propagate to the output layer progressively. (b) In the neuron, propagated data is transformed with designated activation function.
(a)
Overall structure of conventional ANN model(b)
Interior structure of ANN hidden neuronANN produces robust results for several noises or incomplete data and has the advantage of being able to perform well in complex models [41] but has the disadvantages of passing through the hidden layer and transferring initial input data in a transformed state and vanishing gradients in finding the optimal value of parameters [42].


## 2.2. Recurrent Neural Networks

Recurrent neural networks (RNNs) are artificial neural networks that can utilize inference about past events due to the loop of delivering data and the loop of keeping initial input data intact. The RNN has the advantage of considering the context of the previous time-step when computing the current time-step. Due to this advantage, it is advantageous for repetitive and sequential time series data processing. However, like ANN, it has the disadvantage that Vanishing Gradient occurs in the process of finding the optimal value of parameters.Therefore, the longer the time-step of the data leads to the long-term dependency problem, making it challenging to connect information and complex to utilize the context of the previous data [43].


## 2.3. Long Short-Term Memory

Long short-term memory (LSTM) is a type of RNN. The structure of the LSTM is shown in Figure2. Unlike standard RNN, which has only one activation function in the loop, keeping the initial input data intact, LSTM contains multiple activation functions and operations within four interactive layers. In an LSTM structure, the section through which information is selectively passed is called “Gate”, and the path through which the information flows in a straight line along the entire LSTM cell is called “Cell State”. Each gate is composed of functions such as sigmoid and tanh and calculations [43].Figure 2
Structure of LSTM. (a) LSTM model consisted with diverse cells which sequentially aligned. (b) In the cell, there are four steps (forget gate, input gate, cell state, and output gate) to propagate data to the next cell. Each of the four steps has extinct role.
(a)
Overall structure of conventional LSTM model(b)
Interior structure of LSTM cellThe first layer of LSTM is the forget gate, which receives the input valuext of the current time-step and the output value ht−1 of the previous time-step and determines information to be discarded through the sigmoid operation. The second layer is the input gate, which receives the input value xt of the current time-step and the output value ht−1 of the previous time-step and determines what information to store through the sigmoid and tanh operations. The third layer is a layer that updates the cell state output value Ct−1 of the previous time-step to the cell state Ct of the current time-step, and the fourth layer is a layer that determines information to be output based on the cell state Ct of the current time-step [43].LSTM is designed to solve the long-term dependency problem of RNNs [44]. As mentioned, it aims to derive more accurate output values by properly combining appropriate historical and current information through multiple layers. As LSTM is a type of RNN, it is beneficial for models that use time series data, and when the length of the input data is very long, it usually derives higher predictive performance than RNN [43].


## 2.4. Performance Evaluation Metrics

In this study, mean absolute error (MAE), coefficient of variation of the root mean square error (CV(RMSE)), and normalized mean bias error (NMBE) are used as performance evaluation metrics to analyze the prediction performance of developed models. The low MAE and CV(RMSE), the low absolute value of NMBE, and highR2 mean the difference between measured and prediction value is low, indicating the high prediction performance. For the equation of each performance evaluation metric, yk means the kth measured value and yk^ means the kth prediction value.
(1)
MAE is an intuitive indicator of the magnitude of the mean error, which utilizes the absolute value of the difference between predicted and measured values [45].(1)MAE=∑k=1nyk−yk^n(2)
CV(RMSE) is the performance indicator that utilizes the proportion of square root of square value of the difference between predicted and measured values. According to the ASHRAE Guideline 14, the hourly prediction model has effectiveness with less than 30% of CV(RMSE) [46, 47].(2)CVRMSE=∑k=1nyk−yk∧2/n∑k=1nyk/n∗100%(3)
NMBE is the performance indicator that utilizes the proportion of summation of the difference between predicted and measured values. According to the ASHRAE Guideline 14, the hourly prediction model has effectiveness with the range between -10% and 10% of the NMBE [45, 46].(3)NMBE=∑k=1nyk−yk^∑k=1nyk∗100%(4)
R-square (R2) is the performance indicator that explains the degree of suitability of the prediction model to the measured value. Therefore, it shows the distance between the regression line of the measured line and the prediction value. R-square ranges between 0 and 1, and the closer it is to 1, the higher the prediction performance. According to the ASHRAE Handbook, R-square higher than 0.75 has effectiveness [48, 49].(4)R2=1−∑k=1nyk∧−yk2∑k=1n∑k=1nyk/n−yk2


## 3. Data Processing and Predictive Model Development

### 3.1. Data Preprocessing

#### 3.1.1. Meteorological Data Set

In this study, weather data provided by the Korea Meteorological Administration (KMA) were measured every hour at the meteorological observatory in Cheongju, Republic of Korea (36°38 north and 127°26 east) from 2012 to 2021. Of the 87,672 time-steps during the period, 87,670 data were used, excluding the two time-steps where all data were missing. Among the 87,670 data, in the case of insolation, when the sun did not rise, the corresponding value was assumed to be 0, and then, learning was conducted. For model verification, data from Jeju, Republic of Korea (33°51 north and 126°53 east); Santa Barbara, CA, USA (34°41 north and 119° 88 west); Millbrook, Duchess, NY, USA (41°79 north and 73°74 west) provided by the National Centers for Environmental Information (NCEI) is used. When the sun is below the horizon, the altitude angle is assumed to be 0.


#### 3.1.2. Data Feature Analysis

Cheongju, the measurement location of the data used in this study, has an average temperature of 13.72°C from 2012 to 2021 and average annual precipitation of 1,113.66 mm. Cheongju has 17.1 days of precipitation among 31.8 days of the summer rainy season. During this season, the average seasonal precipitation is about 357.93 mm.The average monthly temperature in January, the coldest month, is -0.86°C, located at the boundary between the temperate and microthermal climates. Cheongju has intermediate climate characteristics between the microthermal climate at the northern end of the Korean Peninsula and the temperate climate at the southern end, which tends to be generally consistent with the average annual average of the Republic of Korea [50]. Cheongju is located at the boundary between the temperate climate and the microthermal climate with a clear four-season climate. In the Köppen-Geiger climate classification [51], Cheongju is classified by microthermal climate. However, the recent climate records have changed slightly due to global warming. As a result, Cheongju has characteristics of both the microthermal climate and the temperate climate.The range of changes in insolation is extensive due to summer precipitation, which has the most radiation reaching the atmosphere. Therefore, in order to accurately predict insolation in Cheongju, a model that predicts insolation changes caused by sudden changes in weather conditions with high accuracy must be developed.


#### 3.1.3. Research Methodology

Figure3 demonstrates the overall flow chart of research methodology.Figure 3
Overall flow chart of research methodology. In this project, ANN-based, LSTM-based, and linear regression models are constructed to derive the optimal model from predicting hourly insolation. After deriving the optimal model, a detailed analysis is processed to verify the result and propose further research.


#### 3.1.4. Input Variable Selection through the Pearson Correlation Coefficient Analysis

Before selecting the input variables for the prediction, a correlation analysis was conducted using the Pearson correlation coefficient (PCC) analysis to find the correlation between the output variable and the input variable, which is the goal of the prediction. PCC is an index that represents a linear correlation between two variables and is the most frequently used correlation measure. The following equation can express PCC [52]:
(5)rxy=∑xk−x¯∑yk−y¯∑xk−x¯2∑yk−y¯2,where x¯=∑k=1nxk/n,y¯=∑k=1nyk/n., rxy=1 (x and y are closely correlated), and rxy=0 (the linear correlation between x and y is not obvious).The closer ther value indicating the correlation between variables is to 0, the lower the correlation between the two variables is, and the closer the 1 is, the higher the correlation between the two variables is. In this study, among Cohen’s detection, r2>0.7, the criterion for determining the suitability of variables in the engineering field was selected as the primary criterion [53]. If there is no variable suitable for this criterion, r>0.3 was selected as the secondary criterion according to previous studies to determine and select the suitability of the input variable [54]. IBM Statistics SPSS 26 was used as software for PCC analysis.Figure4 shows the Pearson correlation coefficient r value derived through PCC analysis using longitudinal meteorological observation data provided by the KMA. According to the criteria for determining the suitability of the input variable, the selected input variable for predicting the insolation(t+1) includes wind speed, humidity, solar altitude angle, ambient air temperature, insolation(t−23), and insolation(t). Hereafter, insolation(t+1), insolation(t−23), and insolation(t) indicate the insolation at one hour after the current time-step, insolation at 23 hours before the current time-step, and insolation at the current time-step, respectively.Figure 4
PCC analysis among meteorological variables. The overall result of PCC for every available data. A number of each box indicates the PCC between thex-axis variable and the y-axis variable. The darker the color of the box, the higher the Pearson correlation.Pearson correlation coefficientsr and r2 of the selected input variables are shown in Table 1. In this study, in addition to the input variable selected by PCC, the model was constructed by adding the classification data, hour, to the variable to improve the model’s accuracy.Table 1
PCC analysis among selected input variables.
Wind speedHumiditySolar altitude angleAmbient air temperatureInsolation(t−23)Insolation(t)r0.302-0.3610.8680.4950.8230.927r20.0910.1300.7530.2450.6770.859


#### 3.1.5. Data Scaling

The most frequently used normalization function for regression analysis is MinMax Scaler, which transforms the entire data by transforming the minimum value of data to zero and the maximum value to 1. Therefore, there is a disadvantage that the inclusion of data outliers that are too large or too small in size affects the entire data set [55]. The distribution of each input variable does not change even if the maximum and minimum values of the input variables are converted equally through normalization, and it is most appropriate to use quantile transformer in terms of computational speed, variance, and bias when using input variables with various distributions [56].The input variables used in this study have various distributions as shown in Figure5. The x-axis represents the absolute value of the input variable, and the y-axis represents the frequency of occurrence. In particular, the insolation(t) and solar altitude angle, which were the most correlated with insolation(t+1) in the PCC analysis described in Section 3.1 (3), showed that about 50% of the data was zero, indicating that the data is concentrated to one side. Therefore, if normalization is carried out using a normalization function that uses the size of data values, such as the minimum and maximum values of variables, the weight for insolation(t) and solar altitude angles may be distorted. Therefore, normalization was carried out using quantile transformer, which converts diverse data sets nonlinearly [55] using the quantile among the normalization functions [57].Figure 5
Distribution of input variables. The selected input variables have distinct distributions in frequency. The insolation and sun angle has a very skewed distribution, and the hour has an even distribution.


### 3.2. Predictive Model Development and Performance Evaluation

#### 3.2.1. Regression Analysis

Regression analysis was conducted using IBM Statistics SPSS 26, a statistical analysis software. To make the regression equations, 78,910 time-step data sets from 2012 to 2020 were used among the 87,670 data sets. To verify the regression equation, 8,760 time-step data sets corresponding to 2021 were used as the test set. Regression analysis was conducted using variables selected through PCC analysis. According to the regression analysis results, the most effective regression equation was created when all variables selected by PCC analysis were included, and the resulting regression equation is as follows:Insolationt+1=−0.047x1+0.001x2−0.004x3+0.719x4+0.579x5−0.006x6+0.090x7+0.050 (x1=windspeed, x2=humidity, x3=ambientairtemperature, x4=insolationt, x5=sunangle, x6=hour, and x7=insolationt−23).Table2 shows the results of predicting 2021 data through the derived regression equation.Table 2
Prediction performance of regression analysis.
CaseMAENMBECV(RMSE)R2R10.19646.764848.32850.8831


#### 3.2.2. Deep Learning-Based Predictive Model Development

Of the 87,670 total data used in the study, 8,760 data sets corresponding to 2021 were used as test sets, 70,975 data sets corresponding to 90% of the 2012-2020 data sets were used as train sets, and 7,887 data corresponding to 10% were used as validation sets. In this study, LSTM and ANN algorithms were developed on Intel core i7 at 3.00 GHz, and 16 GB memory computers and Google Collaboration based on python were utilized to use various data analysis packages. To construct the LSTM- and ANN-based models, Keras Library, which provides various tools to simplify algorithms, was used. Based on the PCC analysis in Section3.1 (2), a model was designated to derive optimal predictive performance by adjusting parameters such as window size and hidden layer using the selected input variables. Mean square error was used as a loss function, Adam was used as an optimizer, and the number of hidden neurons was selected according to previous studies [58].


#### 3.2.3. ANN-Based Model Optimization

The prediction performance of the ANN-based model is shown in Table3. In the case of ANN-based models, as shown in Table 3, the type of activation function and prediction performance was not significantly related, and it was confirmed that NMBE increased as the number of layers increased. Since the time required for computation increases as the number of layers increases, the A1 model with acceptable prediction performance, less bias, and faster computational speed was determined as the optimized ANN-based model.Table 3
Prediction performance of ANN-based models.
CaseLayerActivation functionMAENMBECV(RMSE)R2A11ReLu0.0274-0.073514.03530.9798A21Sigmoid0.02860.067514.18400.9794A32ReLu0.0263-0.039614.24710.9792A42Sigmoid0.02670.393514.04430.9799A53ReLu0.02550.451414.25090.9794A63Sigmoid0.02760.807814.17270.9797The structure of the optimized ANN model is presented in Figure6. The optimized A1 model has 2 layers. The ANN layer of the A1 model is processed by the activation function of ReLu with 15 hidden neurons.Figure 6
Structure of A1 model. Each hidden neuron of the A1 model has ReLu as an activation function. The output layer consists of linear function.The output layer of the A1 model integrates all neuron’s results and is converted to the output value, which is the objective, insolation(t+1) with linear activation function. The model has a learning process with an Adam optimizer based on a 0.001 initial learning rate.


#### 3.2.4. LSTM-Based Model Optimization

Table4 shows the prediction performance of the LSTM-based model. Since a low CV(RMSE) was derived when the window size was 24 or 36 and a low NMBE was derived when the window size was 24, it can be interpreted that the model’s error rate was low and the degree of deflection was the smallest when the window size was 24. Therefore, the optimal LSTM model was selected as L2, considering the performance metrics in Table 4 and the computational time.Table 4
Prediction performance of LSTM-based models.
CaseLayerWindow sizeMAENMBECV(RMSE)R2L11120.03591.588219.03630.9640L21240.03120.242915.80190.9745L31360.09090.461715.90800.9742L42120.03431.252618.51900.9657L52240.02960.741215.28550.9764L62360.03070.903215.51970.9757L73120.03441.660118.33630.9666L83240.03010.317015.54850.9753L93360.0300-0.329315.42080.9754The structure of the optimized LSTM model is presented in Figure7. The optimized L2 model has 1 LSTM layer with 15 hidden neurons, learning with Adam optimizer based on a 0.001 initial learning rate. The result of the LSTM layer is collected and converted into the final output, which is our objective insolation(t+1) at the output layerwith the activation function of linear.Figure 7
Structure of L2 model. The L2 model has 1 LSTM layer with a window size of 24 and 1 output layer.The LSTM layer is constructed with LSTM cells every time-step. The cell structure of the optimized L2 model is presented in Figure8. Each cell of LSTM utilizes the concatenated result by 7 input data and ht−1, the output value of prior time-step, for the prediction. In addition, Ct−1, the cell state value of prior time-step, is also used to predict the output value ht.Figure 8
Cell structure of L2 model. In the LSTM layer, there are sequential LSTM cells exist. In each LSTM cell, input data and propagated data are transformed through the concatenate, multiplication, addition, and functionalized process.


## 3.1. Data Preprocessing

### 3.1.1. Meteorological Data Set

In this study, weather data provided by the Korea Meteorological Administration (KMA) were measured every hour at the meteorological observatory in Cheongju, Republic of Korea (36°38 north and 127°26 east) from 2012 to 2021. Of the 87,672 time-steps during the period, 87,670 data were used, excluding the two time-steps where all data were missing. Among the 87,670 data, in the case of insolation, when the sun did not rise, the corresponding value was assumed to be 0, and then, learning was conducted. For model verification, data from Jeju, Republic of Korea (33°51 north and 126°53 east); Santa Barbara, CA, USA (34°41 north and 119° 88 west); Millbrook, Duchess, NY, USA (41°79 north and 73°74 west) provided by the National Centers for Environmental Information (NCEI) is used. When the sun is below the horizon, the altitude angle is assumed to be 0.


### 3.1.2. Data Feature Analysis

Cheongju, the measurement location of the data used in this study, has an average temperature of 13.72°C from 2012 to 2021 and average annual precipitation of 1,113.66 mm. Cheongju has 17.1 days of precipitation among 31.8 days of the summer rainy season. During this season, the average seasonal precipitation is about 357.93 mm.The average monthly temperature in January, the coldest month, is -0.86°C, located at the boundary between the temperate and microthermal climates. Cheongju has intermediate climate characteristics between the microthermal climate at the northern end of the Korean Peninsula and the temperate climate at the southern end, which tends to be generally consistent with the average annual average of the Republic of Korea [50]. Cheongju is located at the boundary between the temperate climate and the microthermal climate with a clear four-season climate. In the Köppen-Geiger climate classification [51], Cheongju is classified by microthermal climate. However, the recent climate records have changed slightly due to global warming. As a result, Cheongju has characteristics of both the microthermal climate and the temperate climate.The range of changes in insolation is extensive due to summer precipitation, which has the most radiation reaching the atmosphere. Therefore, in order to accurately predict insolation in Cheongju, a model that predicts insolation changes caused by sudden changes in weather conditions with high accuracy must be developed.


### 3.1.3. Research Methodology

Figure3 demonstrates the overall flow chart of research methodology.Figure 3
Overall flow chart of research methodology. In this project, ANN-based, LSTM-based, and linear regression models are constructed to derive the optimal model from predicting hourly insolation. After deriving the optimal model, a detailed analysis is processed to verify the result and propose further research.


### 3.1.4. Input Variable Selection through the Pearson Correlation Coefficient Analysis

Before selecting the input variables for the prediction, a correlation analysis was conducted using the Pearson correlation coefficient (PCC) analysis to find the correlation between the output variable and the input variable, which is the goal of the prediction. PCC is an index that represents a linear correlation between two variables and is the most frequently used correlation measure. The following equation can express PCC [52]:
(5)rxy=∑xk−x¯∑yk−y¯∑xk−x¯2∑yk−y¯2,where x¯=∑k=1nxk/n,y¯=∑k=1nyk/n., rxy=1 (x and y are closely correlated), and rxy=0 (the linear correlation between x and y is not obvious).The closer ther value indicating the correlation between variables is to 0, the lower the correlation between the two variables is, and the closer the 1 is, the higher the correlation between the two variables is. In this study, among Cohen’s detection, r2>0.7, the criterion for determining the suitability of variables in the engineering field was selected as the primary criterion [53]. If there is no variable suitable for this criterion, r>0.3 was selected as the secondary criterion according to previous studies to determine and select the suitability of the input variable [54]. IBM Statistics SPSS 26 was used as software for PCC analysis.Figure4 shows the Pearson correlation coefficient r value derived through PCC analysis using longitudinal meteorological observation data provided by the KMA. According to the criteria for determining the suitability of the input variable, the selected input variable for predicting the insolation(t+1) includes wind speed, humidity, solar altitude angle, ambient air temperature, insolation(t−23), and insolation(t). Hereafter, insolation(t+1), insolation(t−23), and insolation(t) indicate the insolation at one hour after the current time-step, insolation at 23 hours before the current time-step, and insolation at the current time-step, respectively.Figure 4
PCC analysis among meteorological variables. The overall result of PCC for every available data. A number of each box indicates the PCC between thex-axis variable and the y-axis variable. The darker the color of the box, the higher the Pearson correlation.Pearson correlation coefficientsr and r2 of the selected input variables are shown in Table 1. In this study, in addition to the input variable selected by PCC, the model was constructed by adding the classification data, hour, to the variable to improve the model’s accuracy.Table 1
PCC analysis among selected input variables.
Wind speedHumiditySolar altitude angleAmbient air temperatureInsolation(t−23)Insolation(t)r0.302-0.3610.8680.4950.8230.927r20.0910.1300.7530.2450.6770.859


### 3.1.5. Data Scaling

The most frequently used normalization function for regression analysis is MinMax Scaler, which transforms the entire data by transforming the minimum value of data to zero and the maximum value to 1. Therefore, there is a disadvantage that the inclusion of data outliers that are too large or too small in size affects the entire data set [55]. The distribution of each input variable does not change even if the maximum and minimum values of the input variables are converted equally through normalization, and it is most appropriate to use quantile transformer in terms of computational speed, variance, and bias when using input variables with various distributions [56].The input variables used in this study have various distributions as shown in Figure5. The x-axis represents the absolute value of the input variable, and the y-axis represents the frequency of occurrence. In particular, the insolation(t) and solar altitude angle, which were the most correlated with insolation(t+1) in the PCC analysis described in Section 3.1 (3), showed that about 50% of the data was zero, indicating that the data is concentrated to one side. Therefore, if normalization is carried out using a normalization function that uses the size of data values, such as the minimum and maximum values of variables, the weight for insolation(t) and solar altitude angles may be distorted. Therefore, normalization was carried out using quantile transformer, which converts diverse data sets nonlinearly [55] using the quantile among the normalization functions [57].Figure 5
Distribution of input variables. The selected input variables have distinct distributions in frequency. The insolation and sun angle has a very skewed distribution, and the hour has an even distribution.


## 3.1.1. Meteorological Data Set

In this study, weather data provided by the Korea Meteorological Administration (KMA) were measured every hour at the meteorological observatory in Cheongju, Republic of Korea (36°38 north and 127°26 east) from 2012 to 2021. Of the 87,672 time-steps during the period, 87,670 data were used, excluding the two time-steps where all data were missing. Among the 87,670 data, in the case of insolation, when the sun did not rise, the corresponding value was assumed to be 0, and then, learning was conducted. For model verification, data from Jeju, Republic of Korea (33°51 north and 126°53 east); Santa Barbara, CA, USA (34°41 north and 119° 88 west); Millbrook, Duchess, NY, USA (41°79 north and 73°74 west) provided by the National Centers for Environmental Information (NCEI) is used. When the sun is below the horizon, the altitude angle is assumed to be 0.


## 3.1.2. Data Feature Analysis

Cheongju, the measurement location of the data used in this study, has an average temperature of 13.72°C from 2012 to 2021 and average annual precipitation of 1,113.66 mm. Cheongju has 17.1 days of precipitation among 31.8 days of the summer rainy season. During this season, the average seasonal precipitation is about 357.93 mm.The average monthly temperature in January, the coldest month, is -0.86°C, located at the boundary between the temperate and microthermal climates. Cheongju has intermediate climate characteristics between the microthermal climate at the northern end of the Korean Peninsula and the temperate climate at the southern end, which tends to be generally consistent with the average annual average of the Republic of Korea [50]. Cheongju is located at the boundary between the temperate climate and the microthermal climate with a clear four-season climate. In the Köppen-Geiger climate classification [51], Cheongju is classified by microthermal climate. However, the recent climate records have changed slightly due to global warming. As a result, Cheongju has characteristics of both the microthermal climate and the temperate climate.The range of changes in insolation is extensive due to summer precipitation, which has the most radiation reaching the atmosphere. Therefore, in order to accurately predict insolation in Cheongju, a model that predicts insolation changes caused by sudden changes in weather conditions with high accuracy must be developed.


## 3.1.3. Research Methodology

Figure3 demonstrates the overall flow chart of research methodology.Figure 3
Overall flow chart of research methodology. In this project, ANN-based, LSTM-based, and linear regression models are constructed to derive the optimal model from predicting hourly insolation. After deriving the optimal model, a detailed analysis is processed to verify the result and propose further research.


## 3.1.4. Input Variable Selection through the Pearson Correlation Coefficient Analysis

Before selecting the input variables for the prediction, a correlation analysis was conducted using the Pearson correlation coefficient (PCC) analysis to find the correlation between the output variable and the input variable, which is the goal of the prediction. PCC is an index that represents a linear correlation between two variables and is the most frequently used correlation measure. The following equation can express PCC [52]:
(5)rxy=∑xk−x¯∑yk−y¯∑xk−x¯2∑yk−y¯2,where x¯=∑k=1nxk/n,y¯=∑k=1nyk/n., rxy=1 (x and y are closely correlated), and rxy=0 (the linear correlation between x and y is not obvious).The closer ther value indicating the correlation between variables is to 0, the lower the correlation between the two variables is, and the closer the 1 is, the higher the correlation between the two variables is. In this study, among Cohen’s detection, r2>0.7, the criterion for determining the suitability of variables in the engineering field was selected as the primary criterion [53]. If there is no variable suitable for this criterion, r>0.3 was selected as the secondary criterion according to previous studies to determine and select the suitability of the input variable [54]. IBM Statistics SPSS 26 was used as software for PCC analysis.Figure4 shows the Pearson correlation coefficient r value derived through PCC analysis using longitudinal meteorological observation data provided by the KMA. According to the criteria for determining the suitability of the input variable, the selected input variable for predicting the insolation(t+1) includes wind speed, humidity, solar altitude angle, ambient air temperature, insolation(t−23), and insolation(t). Hereafter, insolation(t+1), insolation(t−23), and insolation(t) indicate the insolation at one hour after the current time-step, insolation at 23 hours before the current time-step, and insolation at the current time-step, respectively.Figure 4
PCC analysis among meteorological variables. The overall result of PCC for every available data. A number of each box indicates the PCC between thex-axis variable and the y-axis variable. The darker the color of the box, the higher the Pearson correlation.Pearson correlation coefficientsr and r2 of the selected input variables are shown in Table 1. In this study, in addition to the input variable selected by PCC, the model was constructed by adding the classification data, hour, to the variable to improve the model’s accuracy.Table 1
PCC analysis among selected input variables.
Wind speedHumiditySolar altitude angleAmbient air temperatureInsolation(t−23)Insolation(t)r0.302-0.3610.8680.4950.8230.927r20.0910.1300.7530.2450.6770.859


## 3.1.5. Data Scaling

The most frequently used normalization function for regression analysis is MinMax Scaler, which transforms the entire data by transforming the minimum value of data to zero and the maximum value to 1. Therefore, there is a disadvantage that the inclusion of data outliers that are too large or too small in size affects the entire data set [55]. The distribution of each input variable does not change even if the maximum and minimum values of the input variables are converted equally through normalization, and it is most appropriate to use quantile transformer in terms of computational speed, variance, and bias when using input variables with various distributions [56].The input variables used in this study have various distributions as shown in Figure5. The x-axis represents the absolute value of the input variable, and the y-axis represents the frequency of occurrence. In particular, the insolation(t) and solar altitude angle, which were the most correlated with insolation(t+1) in the PCC analysis described in Section 3.1 (3), showed that about 50% of the data was zero, indicating that the data is concentrated to one side. Therefore, if normalization is carried out using a normalization function that uses the size of data values, such as the minimum and maximum values of variables, the weight for insolation(t) and solar altitude angles may be distorted. Therefore, normalization was carried out using quantile transformer, which converts diverse data sets nonlinearly [55] using the quantile among the normalization functions [57].Figure 5
Distribution of input variables. The selected input variables have distinct distributions in frequency. The insolation and sun angle has a very skewed distribution, and the hour has an even distribution.


## 3.2. Predictive Model Development and Performance Evaluation

### 3.2.1. Regression Analysis

Regression analysis was conducted using IBM Statistics SPSS 26, a statistical analysis software. To make the regression equations, 78,910 time-step data sets from 2012 to 2020 were used among the 87,670 data sets. To verify the regression equation, 8,760 time-step data sets corresponding to 2021 were used as the test set. Regression analysis was conducted using variables selected through PCC analysis. According to the regression analysis results, the most effective regression equation was created when all variables selected by PCC analysis were included, and the resulting regression equation is as follows:Insolationt+1=−0.047x1+0.001x2−0.004x3+0.719x4+0.579x5−0.006x6+0.090x7+0.050 (x1=windspeed, x2=humidity, x3=ambientairtemperature, x4=insolationt, x5=sunangle, x6=hour, and x7=insolationt−23).Table2 shows the results of predicting 2021 data through the derived regression equation.Table 2
Prediction performance of regression analysis.
CaseMAENMBECV(RMSE)R2R10.19646.764848.32850.8831


### 3.2.2. Deep Learning-Based Predictive Model Development

Of the 87,670 total data used in the study, 8,760 data sets corresponding to 2021 were used as test sets, 70,975 data sets corresponding to 90% of the 2012-2020 data sets were used as train sets, and 7,887 data corresponding to 10% were used as validation sets. In this study, LSTM and ANN algorithms were developed on Intel core i7 at 3.00 GHz, and 16 GB memory computers and Google Collaboration based on python were utilized to use various data analysis packages. To construct the LSTM- and ANN-based models, Keras Library, which provides various tools to simplify algorithms, was used. Based on the PCC analysis in Section3.1 (2), a model was designated to derive optimal predictive performance by adjusting parameters such as window size and hidden layer using the selected input variables. Mean square error was used as a loss function, Adam was used as an optimizer, and the number of hidden neurons was selected according to previous studies [58].


### 3.2.3. ANN-Based Model Optimization

The prediction performance of the ANN-based model is shown in Table3. In the case of ANN-based models, as shown in Table 3, the type of activation function and prediction performance was not significantly related, and it was confirmed that NMBE increased as the number of layers increased. Since the time required for computation increases as the number of layers increases, the A1 model with acceptable prediction performance, less bias, and faster computational speed was determined as the optimized ANN-based model.Table 3
Prediction performance of ANN-based models.
CaseLayerActivation functionMAENMBECV(RMSE)R2A11ReLu0.0274-0.073514.03530.9798A21Sigmoid0.02860.067514.18400.9794A32ReLu0.0263-0.039614.24710.9792A42Sigmoid0.02670.393514.04430.9799A53ReLu0.02550.451414.25090.9794A63Sigmoid0.02760.807814.17270.9797The structure of the optimized ANN model is presented in Figure6. The optimized A1 model has 2 layers. The ANN layer of the A1 model is processed by the activation function of ReLu with 15 hidden neurons.Figure 6
Structure of A1 model. Each hidden neuron of the A1 model has ReLu as an activation function. The output layer consists of linear function.The output layer of the A1 model integrates all neuron’s results and is converted to the output value, which is the objective, insolation(t+1) with linear activation function. The model has a learning process with an Adam optimizer based on a 0.001 initial learning rate.


### 3.2.4. LSTM-Based Model Optimization

Table4 shows the prediction performance of the LSTM-based model. Since a low CV(RMSE) was derived when the window size was 24 or 36 and a low NMBE was derived when the window size was 24, it can be interpreted that the model’s error rate was low and the degree of deflection was the smallest when the window size was 24. Therefore, the optimal LSTM model was selected as L2, considering the performance metrics in Table 4 and the computational time.Table 4
Prediction performance of LSTM-based models.
CaseLayerWindow sizeMAENMBECV(RMSE)R2L11120.03591.588219.03630.9640L21240.03120.242915.80190.9745L31360.09090.461715.90800.9742L42120.03431.252618.51900.9657L52240.02960.741215.28550.9764L62360.03070.903215.51970.9757L73120.03441.660118.33630.9666L83240.03010.317015.54850.9753L93360.0300-0.329315.42080.9754The structure of the optimized LSTM model is presented in Figure7. The optimized L2 model has 1 LSTM layer with 15 hidden neurons, learning with Adam optimizer based on a 0.001 initial learning rate. The result of the LSTM layer is collected and converted into the final output, which is our objective insolation(t+1) at the output layerwith the activation function of linear.Figure 7
Structure of L2 model. The L2 model has 1 LSTM layer with a window size of 24 and 1 output layer.The LSTM layer is constructed with LSTM cells every time-step. The cell structure of the optimized L2 model is presented in Figure8. Each cell of LSTM utilizes the concatenated result by 7 input data and ht−1, the output value of prior time-step, for the prediction. In addition, Ct−1, the cell state value of prior time-step, is also used to predict the output value ht.Figure 8
Cell structure of L2 model. In the LSTM layer, there are sequential LSTM cells exist. In each LSTM cell, input data and propagated data are transformed through the concatenate, multiplication, addition, and functionalized process.


## 3.2.1. Regression Analysis

Regression analysis was conducted using IBM Statistics SPSS 26, a statistical analysis software. To make the regression equations, 78,910 time-step data sets from 2012 to 2020 were used among the 87,670 data sets. To verify the regression equation, 8,760 time-step data sets corresponding to 2021 were used as the test set. Regression analysis was conducted using variables selected through PCC analysis. According to the regression analysis results, the most effective regression equation was created when all variables selected by PCC analysis were included, and the resulting regression equation is as follows:Insolationt+1=−0.047x1+0.001x2−0.004x3+0.719x4+0.579x5−0.006x6+0.090x7+0.050 (x1=windspeed, x2=humidity, x3=ambientairtemperature, x4=insolationt, x5=sunangle, x6=hour, and x7=insolationt−23).Table2 shows the results of predicting 2021 data through the derived regression equation.Table 2
Prediction performance of regression analysis.
CaseMAENMBECV(RMSE)R2R10.19646.764848.32850.8831


## 3.2.2. Deep Learning-Based Predictive Model Development

Of the 87,670 total data used in the study, 8,760 data sets corresponding to 2021 were used as test sets, 70,975 data sets corresponding to 90% of the 2012-2020 data sets were used as train sets, and 7,887 data corresponding to 10% were used as validation sets. In this study, LSTM and ANN algorithms were developed on Intel core i7 at 3.00 GHz, and 16 GB memory computers and Google Collaboration based on python were utilized to use various data analysis packages. To construct the LSTM- and ANN-based models, Keras Library, which provides various tools to simplify algorithms, was used. Based on the PCC analysis in Section3.1 (2), a model was designated to derive optimal predictive performance by adjusting parameters such as window size and hidden layer using the selected input variables. Mean square error was used as a loss function, Adam was used as an optimizer, and the number of hidden neurons was selected according to previous studies [58].


## 3.2.3. ANN-Based Model Optimization

The prediction performance of the ANN-based model is shown in Table3. In the case of ANN-based models, as shown in Table 3, the type of activation function and prediction performance was not significantly related, and it was confirmed that NMBE increased as the number of layers increased. Since the time required for computation increases as the number of layers increases, the A1 model with acceptable prediction performance, less bias, and faster computational speed was determined as the optimized ANN-based model.Table 3
Prediction performance of ANN-based models.
CaseLayerActivation functionMAENMBECV(RMSE)R2A11ReLu0.0274-0.073514.03530.9798A21Sigmoid0.02860.067514.18400.9794A32ReLu0.0263-0.039614.24710.9792A42Sigmoid0.02670.393514.04430.9799A53ReLu0.02550.451414.25090.9794A63Sigmoid0.02760.807814.17270.9797The structure of the optimized ANN model is presented in Figure6. The optimized A1 model has 2 layers. The ANN layer of the A1 model is processed by the activation function of ReLu with 15 hidden neurons.Figure 6
Structure of A1 model. Each hidden neuron of the A1 model has ReLu as an activation function. The output layer consists of linear function.The output layer of the A1 model integrates all neuron’s results and is converted to the output value, which is the objective, insolation(t+1) with linear activation function. The model has a learning process with an Adam optimizer based on a 0.001 initial learning rate.


## 3.2.4. LSTM-Based Model Optimization

Table4 shows the prediction performance of the LSTM-based model. Since a low CV(RMSE) was derived when the window size was 24 or 36 and a low NMBE was derived when the window size was 24, it can be interpreted that the model’s error rate was low and the degree of deflection was the smallest when the window size was 24. Therefore, the optimal LSTM model was selected as L2, considering the performance metrics in Table 4 and the computational time.Table 4
Prediction performance of LSTM-based models.
CaseLayerWindow sizeMAENMBECV(RMSE)R2L11120.03591.588219.03630.9640L21240.03120.242915.80190.9745L31360.09090.461715.90800.9742L42120.03431.252618.51900.9657L52240.02960.741215.28550.9764L62360.03070.903215.51970.9757L73120.03441.660118.33630.9666L83240.03010.317015.54850.9753L93360.0300-0.329315.42080.9754The structure of the optimized LSTM model is presented in Figure7. The optimized L2 model has 1 LSTM layer with 15 hidden neurons, learning with Adam optimizer based on a 0.001 initial learning rate. The result of the LSTM layer is collected and converted into the final output, which is our objective insolation(t+1) at the output layerwith the activation function of linear.Figure 7
Structure of L2 model. The L2 model has 1 LSTM layer with a window size of 24 and 1 output layer.The LSTM layer is constructed with LSTM cells every time-step. The cell structure of the optimized L2 model is presented in Figure8. Each cell of LSTM utilizes the concatenated result by 7 input data and ht−1, the output value of prior time-step, for the prediction. In addition, Ct−1, the cell state value of prior time-step, is also used to predict the output value ht.Figure 8
Cell structure of L2 model. In the LSTM layer, there are sequential LSTM cells exist. In each LSTM cell, input data and propagated data are transformed through the concatenate, multiplication, addition, and functionalized process.


## 4. Prediction Results Analysis and Discussion

Unlike previous papers that predicted daily insolation, this study has a high utilization in EMS by establishing a model for predicting hourly insolation [24–29]. It also has the advantage of being the basis for future studies or being applied in practice using only the weather observation data generally provided by the Meteorological Agency and calculated value. In addition, unlike previous studies, one model using data in all time zones was derived so that it can be used all year round without additional work [37–39]. Significantly, a model that can be used in other regions in the climate zone has been constructed using regional data located at the boundary between temperature and microthermal climate, which are rare in previous studies [23, 24, 33, 34].


### 4.1. Prediction Accuracy Comparison

In this study, the prediction accuracy results of the regression analysis, ANN-based model, and LSTM-based model were compared, as shown in Table5. Hereafter, in cases of regression analysis, ANN and LSTM will be designated as R1, A1, and L2, respectively. According to ASHRAE Guideline 14, if predictive performance is derived within CVRMSE<30% and −10%<NMBE<10% based on hourly data, it can be interpreted as a valid model. Based on this guideline and the prediction performance of each model analyzed earlier, it can be confirmed that the deep learning-based A1 and L2 models, excluding regression analysis-based model R1, derive appropriate prediction performance. Therefore, the result analysis of the prediction model was conducted in further detail based on the A1 and L2 models that derived reliable prediction performance.Table 5
Prediction result of optimum model.
CaseMAENMBECV(RMSE)R2R10.19646.764848.32850.8831A10.0274-0.073514.03530.9798L20.03120.242915.80190.9745Figure8 compares the predicted and measured values by the A1 and L2 models for three days from January 2 to 4, 2021. Through Figure 9, it can be confirmed that both the A1 model and the L2 model derive similar prediction results to the actual measured values.Figure 9
Line graph comparing prediction and measured values. Comparison between the measured insolation value and predicted value by A1 and L2 models.


### 4.2. Detailed Analysis of Prediction Error

As shown in Figure10, it can be seen that the insolation data is distributed only from 0.5 to 1. This pattern is derived from the normalization process of the insolation data, where about 50% of data appears to be zero because the insolation after sunset is all zero. Quantile transformer, which utilizes quantiles, is a normalization method that sorts the entire data set in order of size and then derives transformed values according to the quantiles.Figure 10
Scatter graph comparing prediction and measured values. Normalized insolation value has a very skewed distribution from a normalized value of 0.5 to 1.As shown in Figure5, unlike other input variables with various distributions, the insolation data have a very biased distribution, i.e., most values corresponding to the 0-50% quantile after normalization are zero. Since the insolation data corresponds to the 50-100% quantile and the same quantile of other data goes through a normalization process, the insolation value after the normalization of the data corresponds to the 50% quantile is considerably different from 0. Therefore, after normalization, there is no insolation value between 0 and 0.5.Significant prediction errors have occurred with this biased tendency of insolation data distribution. Based on the investigation of the time-steps showing the top 1% significant difference between the measured values and the predicted values, it was found that about 85% error of the A1 model and 83% error of the L2 model were distributed from 5: 00 a.m. to 7: 00 a.m. and from 5:00 p.m. to 7:00 p.m., which are the sunrise and sunset times, respectively. Sunrise time is a value from zero to nonzero for insolation data, and sunset time is a time zone in which insolation data changes from a value of nonzero to zero. Since quantile transformer was used in this study, in the case of data with measured insolation slightly larger than 0, the difference from 0 significantly increases to about 0.5 after normalization. In this process, it is deemed that the model is not predicting the trends related to sunset and sunrise.Figure11 shows that about 75% of these top 1% errors are concentrated in the fall and winter seasons corresponding to January-March and October-December. Despite an extensive range of insolation changes induced by severe precipitation in the summer rainy season in Cheongju, only a limited number of errors occur in the summer season. Instead, the significant errors are intensively distributed in the winter, when the sunlight hour is short.Figure 11
Seasonal distribution of prediction error. The largest 1% error by A1 and L2 models is concentrated in the fall and winter seasons in the Cheongju.
(a)
1% error by A1 model(b)
1% error by L2 modelOctober-December and January-March, when 75% of the top 1% errors occurred, have a small amount of insolation and short sunlight hours with late sunrise and early sunset. Table6 shows each month’s section’s sunrise and sunset times in 2021 [59]. Through the results of the intensive distribution of upper errors in October-March, it can be confirmed that the prediction model constructed in this study interprets the sunlight time for a long time. These results suggest the possibility of improving the prediction model’s performance by using variables that imply sunrise and sunset times, such as sunlight time, in the future.Table 6
Sunrise and sunset times of each month interval.
Jan.–Mar.Apr.–Jun.Jul.–Sep.Oct.–Dec.Sunrise time7:125:295:487:07Sunset time18:0819:2819:1417:29As noted in LSTM cell structure in Section4.1, LSTM is advantageous in processing time series data because it utilizes the data from the previous time-step [43]. This is evidenced by the fact that in most cases, LSTM-based models derive better predictive performance than ANN-based models in existing insolation prediction studies, which compared ANN-based models and LSTM-based models [26, 33, 36, 39]. However, in this work, ANN-based models derive CV(RMSE) approximately 1-4% lower than LSTM-based models. Unlike previous studies, to analyze the cause of ANN-based models’ higher prediction performance, a model that removed variables related to time series performance was constructed and predicted. In the corresponding model, the weather variables except for insolation(t−23) and insolation(t) with time series properties were used as input variables, and the structure of the model was constructed the same as the ANN-based A1 model and LSTM-based L2 model with the selected optimal structure. As shown in Table 7, the A1 and L2 models were found to derive effective predictive performance even if only the rest of the weather variables except insolation(t) and insolation(t−23) were used. Therefore, the prediction performance of the model is shown in Table 7.Table 7
Prediction performance of selected models excluding the past insolation data as input variables.
MAENMBECV(RMSE)R2A1_excluded0.05152.775424.35200.9425L2_excluded0.04011.980619.61820.9620Figure12 compares the predictive performance of the L2 and A1 models with insolation(t) and insolation(t−23) usage differences. A1 model increases 2.7% of NMBE and 10% of CV(RMSE) without insolation(t) and insolation(t−23) usage. In L2 model, 1.7% of NMBE and 4% of CV(RMSE) increase without insolation(t) and insolation(t−23) usage. Therefore, when insolation(t) and insolation(t−23) are used as input variables, it is found that both ANN and LSTM models improve performance more than when they are not utilized. On the other hand, when insolation(t) and insolation(t−23) were not used as input variables, LSTM derived better prediction performance, but ANN derived better prediction performance when used.Figure 12
Comparison of prediction performance with and without the past insolation data. The A1 and L2 models have improved with past insolation data usage. Especially, the improvement of the A1 model is about 10%.The insolation data used in this study is the amount of insolation measured from the ground. Change in the insolation is derived when the sun is covered or scattered by particles in the atmosphere or clouds and physical obstacles. An insolation meter is installed in a space without trees. In detail, the distance to the nearest building is bigger than the height of the building [60, 61]. Therefore, the effect of blocking or scattering the sun by physical elements installed on the ground is insignificant.Therefore, the amount of insolation is affected by the atmosphere, which is reduced by the sun being covered by clouds or fog [62] or by the concentration of fine dust in the atmosphere [63]. Although the trend can be interpreted through data from the previous time-step if the sun is obscured throughout the day, it is impossible to interpret the trend through the previous time-step data if there is a sudden change in the cloud covering the sun only at a particular time.The L2 model uses two time-step data, i.e., insolation(t) and insolation(t−23), designated as input variables, and the other selectively important information within the past time-step data corresponding to the window size of 24. In comparison, A1 model directly utilizes only the two time-step data, i.e., insolation(t) and insolation(t−23), as input variables. Therefore, the reason why the A1 model’s performance is significantly improved by about 10% when using insolation(t) and insolation(t-23) in this study is expected to be due to the fact that the A1 model examines the tendency of shorter time-step than the L1 model and thus can appropriately capture sudden weather changes.


### 4.3. Applicability Verification of Prediction Models

In order to determine the applicability of the model developed in this study, verification was conducted using 2021 data from Jeju in the Republic of Korea, Santa Barbara in the United States, and Millbrook in the United States as a test set. A1 model and the L2 model were utilized to evaluate. About 0.06% of the meteorological data measured in Santa Barbara and Millbrook differed by more than 500% from the data before and after 1 hour, and in this case, the data at that time zone were considered an error and replaced with the average value of the data after 1 hour.Tables8 and 9 show the results of predicting insolation from Jeju, Santa Barbara, and Millbrook through ANN- and LSTM-based models built using Cheongju weather data in this study. Since ASHRAE Guideline 14-2014 considers a valid model when −10%<NMBE<10% and CVRMSE<30%, it is judged that both ANN-based and LSTM-based models can be used to predict hourly insolation outside Cheongju. Meanwhile, Jeju, Santa Barbara, and Millbrook all derived slightly lower predictive performance than Cheongju’s predictive performance, and in particular, Santa Barbara and Millbrook derived lower predictive performance than Jeju. It was estimated that this was caused by various causes, such as the distribution characteristics of the data and the difference in the measurement process. Significantly, the following three possibilities are proposed in this study.Table 8
Prediction performance of selected ANN model based on data from other regions.
A1JejuSanta BarbaraMillbrookMAE0.03640.03600.0388NMBE-1.8333-1.7962-3.0687CV(RMSE)19.8523.996723.5770R20.96280.94300.9446Table 9
Prediction performance of selected LSTM model based on data from other regions.
L1JejuSanta BarbaraMillbrookMAE0.04020.04050.0442NMBE0.5096-0.1945-1.4579CV(RMSE)21.870824.650225.1121R20.95690.94170.9390First, Millbrook had the lowest ambient air temperature of -23.9°C, which was significantly lower than -10.9°C in Cheongju. Santa Barbara and Jeju had the highest wind speeds of 14.8 m/s and 13.7 m/s, respectively, significantly higher than 8.7 m/s in Cheongju. Therefore, a difference in prediction performance may have occurred in testing with data beyond the range of learning data.Second, in the case of insolation data used in this study, the amount of global radiation throughout 1-hour data is composed of diffuse and direct radiation. Since diffuse insolation varies depending on the environment around the insolation meter, some differences may occur from region to region. In addition, Jeju data is provided by the KMA, while NCEI provides Santa Barbara and Millbrook data. The KMA measures wind speed at 10 m height [60], but NCEI estimates wind speed at 1.5 m [61]. Therefore, data measurement and estimation methods may have caused differences in prediction performance.Third, this study used solar altitude angle data using latitude as input variables, but variables directly related to the geographical location such as latitude and longitude were not fully integrated in the predictive model. Therefore, the prediction performance may have deteriorated due to the difference in geographical location.


## 4.1. Prediction Accuracy Comparison

In this study, the prediction accuracy results of the regression analysis, ANN-based model, and LSTM-based model were compared, as shown in Table5. Hereafter, in cases of regression analysis, ANN and LSTM will be designated as R1, A1, and L2, respectively. According to ASHRAE Guideline 14, if predictive performance is derived within CVRMSE<30% and −10%<NMBE<10% based on hourly data, it can be interpreted as a valid model. Based on this guideline and the prediction performance of each model analyzed earlier, it can be confirmed that the deep learning-based A1 and L2 models, excluding regression analysis-based model R1, derive appropriate prediction performance. Therefore, the result analysis of the prediction model was conducted in further detail based on the A1 and L2 models that derived reliable prediction performance.Table 5
Prediction result of optimum model.
CaseMAENMBECV(RMSE)R2R10.19646.764848.32850.8831A10.0274-0.073514.03530.9798L20.03120.242915.80190.9745Figure8 compares the predicted and measured values by the A1 and L2 models for three days from January 2 to 4, 2021. Through Figure 9, it can be confirmed that both the A1 model and the L2 model derive similar prediction results to the actual measured values.Figure 9
Line graph comparing prediction and measured values. Comparison between the measured insolation value and predicted value by A1 and L2 models.


## 4.2. Detailed Analysis of Prediction Error

As shown in Figure10, it can be seen that the insolation data is distributed only from 0.5 to 1. This pattern is derived from the normalization process of the insolation data, where about 50% of data appears to be zero because the insolation after sunset is all zero. Quantile transformer, which utilizes quantiles, is a normalization method that sorts the entire data set in order of size and then derives transformed values according to the quantiles.Figure 10
Scatter graph comparing prediction and measured values. Normalized insolation value has a very skewed distribution from a normalized value of 0.5 to 1.As shown in Figure5, unlike other input variables with various distributions, the insolation data have a very biased distribution, i.e., most values corresponding to the 0-50% quantile after normalization are zero. Since the insolation data corresponds to the 50-100% quantile and the same quantile of other data goes through a normalization process, the insolation value after the normalization of the data corresponds to the 50% quantile is considerably different from 0. Therefore, after normalization, there is no insolation value between 0 and 0.5.Significant prediction errors have occurred with this biased tendency of insolation data distribution. Based on the investigation of the time-steps showing the top 1% significant difference between the measured values and the predicted values, it was found that about 85% error of the A1 model and 83% error of the L2 model were distributed from 5: 00 a.m. to 7: 00 a.m. and from 5:00 p.m. to 7:00 p.m., which are the sunrise and sunset times, respectively. Sunrise time is a value from zero to nonzero for insolation data, and sunset time is a time zone in which insolation data changes from a value of nonzero to zero. Since quantile transformer was used in this study, in the case of data with measured insolation slightly larger than 0, the difference from 0 significantly increases to about 0.5 after normalization. In this process, it is deemed that the model is not predicting the trends related to sunset and sunrise.Figure11 shows that about 75% of these top 1% errors are concentrated in the fall and winter seasons corresponding to January-March and October-December. Despite an extensive range of insolation changes induced by severe precipitation in the summer rainy season in Cheongju, only a limited number of errors occur in the summer season. Instead, the significant errors are intensively distributed in the winter, when the sunlight hour is short.Figure 11
Seasonal distribution of prediction error. The largest 1% error by A1 and L2 models is concentrated in the fall and winter seasons in the Cheongju.
(a)
1% error by A1 model(b)
1% error by L2 modelOctober-December and January-March, when 75% of the top 1% errors occurred, have a small amount of insolation and short sunlight hours with late sunrise and early sunset. Table6 shows each month’s section’s sunrise and sunset times in 2021 [59]. Through the results of the intensive distribution of upper errors in October-March, it can be confirmed that the prediction model constructed in this study interprets the sunlight time for a long time. These results suggest the possibility of improving the prediction model’s performance by using variables that imply sunrise and sunset times, such as sunlight time, in the future.Table 6
Sunrise and sunset times of each month interval.
Jan.–Mar.Apr.–Jun.Jul.–Sep.Oct.–Dec.Sunrise time7:125:295:487:07Sunset time18:0819:2819:1417:29As noted in LSTM cell structure in Section4.1, LSTM is advantageous in processing time series data because it utilizes the data from the previous time-step [43]. This is evidenced by the fact that in most cases, LSTM-based models derive better predictive performance than ANN-based models in existing insolation prediction studies, which compared ANN-based models and LSTM-based models [26, 33, 36, 39]. However, in this work, ANN-based models derive CV(RMSE) approximately 1-4% lower than LSTM-based models. Unlike previous studies, to analyze the cause of ANN-based models’ higher prediction performance, a model that removed variables related to time series performance was constructed and predicted. In the corresponding model, the weather variables except for insolation(t−23) and insolation(t) with time series properties were used as input variables, and the structure of the model was constructed the same as the ANN-based A1 model and LSTM-based L2 model with the selected optimal structure. As shown in Table 7, the A1 and L2 models were found to derive effective predictive performance even if only the rest of the weather variables except insolation(t) and insolation(t−23) were used. Therefore, the prediction performance of the model is shown in Table 7.Table 7
Prediction performance of selected models excluding the past insolation data as input variables.
MAENMBECV(RMSE)R2A1_excluded0.05152.775424.35200.9425L2_excluded0.04011.980619.61820.9620Figure12 compares the predictive performance of the L2 and A1 models with insolation(t) and insolation(t−23) usage differences. A1 model increases 2.7% of NMBE and 10% of CV(RMSE) without insolation(t) and insolation(t−23) usage. In L2 model, 1.7% of NMBE and 4% of CV(RMSE) increase without insolation(t) and insolation(t−23) usage. Therefore, when insolation(t) and insolation(t−23) are used as input variables, it is found that both ANN and LSTM models improve performance more than when they are not utilized. On the other hand, when insolation(t) and insolation(t−23) were not used as input variables, LSTM derived better prediction performance, but ANN derived better prediction performance when used.Figure 12
Comparison of prediction performance with and without the past insolation data. The A1 and L2 models have improved with past insolation data usage. Especially, the improvement of the A1 model is about 10%.The insolation data used in this study is the amount of insolation measured from the ground. Change in the insolation is derived when the sun is covered or scattered by particles in the atmosphere or clouds and physical obstacles. An insolation meter is installed in a space without trees. In detail, the distance to the nearest building is bigger than the height of the building [60, 61]. Therefore, the effect of blocking or scattering the sun by physical elements installed on the ground is insignificant.Therefore, the amount of insolation is affected by the atmosphere, which is reduced by the sun being covered by clouds or fog [62] or by the concentration of fine dust in the atmosphere [63]. Although the trend can be interpreted through data from the previous time-step if the sun is obscured throughout the day, it is impossible to interpret the trend through the previous time-step data if there is a sudden change in the cloud covering the sun only at a particular time.The L2 model uses two time-step data, i.e., insolation(t) and insolation(t−23), designated as input variables, and the other selectively important information within the past time-step data corresponding to the window size of 24. In comparison, A1 model directly utilizes only the two time-step data, i.e., insolation(t) and insolation(t−23), as input variables. Therefore, the reason why the A1 model’s performance is significantly improved by about 10% when using insolation(t) and insolation(t-23) in this study is expected to be due to the fact that the A1 model examines the tendency of shorter time-step than the L1 model and thus can appropriately capture sudden weather changes.


## 4.3. Applicability Verification of Prediction Models

In order to determine the applicability of the model developed in this study, verification was conducted using 2021 data from Jeju in the Republic of Korea, Santa Barbara in the United States, and Millbrook in the United States as a test set. A1 model and the L2 model were utilized to evaluate. About 0.06% of the meteorological data measured in Santa Barbara and Millbrook differed by more than 500% from the data before and after 1 hour, and in this case, the data at that time zone were considered an error and replaced with the average value of the data after 1 hour.Tables8 and 9 show the results of predicting insolation from Jeju, Santa Barbara, and Millbrook through ANN- and LSTM-based models built using Cheongju weather data in this study. Since ASHRAE Guideline 14-2014 considers a valid model when −10%<NMBE<10% and CVRMSE<30%, it is judged that both ANN-based and LSTM-based models can be used to predict hourly insolation outside Cheongju. Meanwhile, Jeju, Santa Barbara, and Millbrook all derived slightly lower predictive performance than Cheongju’s predictive performance, and in particular, Santa Barbara and Millbrook derived lower predictive performance than Jeju. It was estimated that this was caused by various causes, such as the distribution characteristics of the data and the difference in the measurement process. Significantly, the following three possibilities are proposed in this study.Table 8
Prediction performance of selected ANN model based on data from other regions.
A1JejuSanta BarbaraMillbrookMAE0.03640.03600.0388NMBE-1.8333-1.7962-3.0687CV(RMSE)19.8523.996723.5770R20.96280.94300.9446Table 9
Prediction performance of selected LSTM model based on data from other regions.
L1JejuSanta BarbaraMillbrookMAE0.04020.04050.0442NMBE0.5096-0.1945-1.4579CV(RMSE)21.870824.650225.1121R20.95690.94170.9390First, Millbrook had the lowest ambient air temperature of -23.9°C, which was significantly lower than -10.9°C in Cheongju. Santa Barbara and Jeju had the highest wind speeds of 14.8 m/s and 13.7 m/s, respectively, significantly higher than 8.7 m/s in Cheongju. Therefore, a difference in prediction performance may have occurred in testing with data beyond the range of learning data.Second, in the case of insolation data used in this study, the amount of global radiation throughout 1-hour data is composed of diffuse and direct radiation. Since diffuse insolation varies depending on the environment around the insolation meter, some differences may occur from region to region. In addition, Jeju data is provided by the KMA, while NCEI provides Santa Barbara and Millbrook data. The KMA measures wind speed at 10 m height [60], but NCEI estimates wind speed at 1.5 m [61]. Therefore, data measurement and estimation methods may have caused differences in prediction performance.Third, this study used solar altitude angle data using latitude as input variables, but variables directly related to the geographical location such as latitude and longitude were not fully integrated in the predictive model. Therefore, the prediction performance may have deteriorated due to the difference in geographical location.


## 5. Conclusion and Future Work

This study evaluated prediction performance by constructing a regression model and deep learning-based predictive models to predict hourly insolation in areas located in temperate and microthermal climates with high precipitation. This study developed six models based on ANN, nine models based on LSTM, and 1 model based on linear regression, making up a total of 16 models. In this study, input variables were selected through PCC analysis. As an input variable, wind speed, humidity, solar altitude angle, ambient air temperature, insolation(t−23), and insolation(t) were selected. This study is based on the hourly time-step and was trained based on data from the years of 2012 to 2020 to test 8,760 hours data corresponding to the year of 2021. The outstanding points of this study are highlighted as follows:
(i)
The linear regression model was found to be inappropriate for predicting hourly insolation according to ASHRAE Guideline 14, whereas ANN- and LSTM-based models achieved reliable predictive performance(ii)
All ANN and LSTM-based models developed in this study were evaluated as models suitable according to the ASHRAE criteria. The A1 model, which showed the best predictive performance, derived CV(RMSE) of 14.04, NMBE of -0.0735,R-square of 0.9798, and MAE of 0.0274(iii)
This study proposed the direction of future research for improving the performance of predicting insolation at 1 hour after the current time-step, which has time-dependent characteristics, by utilizing insolation 24 hours before the current time-step and insolation at the current time-step in addition to weather data(iv)
Unlike other studies, the ANN-based model derived better performance than the LSTM-based model. This was considerd to be due to the fact that ANN performance was significantly improved using two past (t and t−23) insolation data(v)
In the optimal models, a significant error occurred at sunrise and sunset times, suggesting the possibility of further improving predictive performance by utilizing variables related to sunrise and sunset in the future(vi)
Along with Cheongju, the proposed model could adequately predict hourly insolation in other regions around the world such as Jeju, Santa Barbara, and Millbrook. The results of predicting other regions derived slightly higher prediction errors than Cheongju. However, it is expected that it will be possible to predict the hourly insolation with better prediction performance if variables related to the geographical location, such as latitude and longitude, can be fully integrated with the predictive model in the future



---

*Source: 3525651-2023-02-03.xml*